Skip to main content

Host a static website with EOS

Introduction

In this tutorial, we will show you how to host a static website on EOS S3 Bucket, individual webpages include static content, and they might also contain client-side scripts which can be hosted on an S3 Bucket. Server-side scripts such as PHP, JSP, or ASP.NET is not supported on EOS S3.

Create Bucket

  1. Go to Products > Storage option in the sidebar menu.

  2. Click on Create New Bucket or the (+) icon.

  3. Enter a unique bucket name. You must follow these guidelines when choosing the bucket name:

    • You must enter a bucket name that is unique across all existing buckets in E2E Object Storage. You cannot choose a name that is already in use by another user.
    • Names can not be changed after creation, so choose wisely.
    • Bucket name must be at least 3 and no more than 63 characters long.
    • Upper case letters or underscores are not allowed.
    • Do not format bucket names like an IP address (e.g., 10.10.10.2).
  4. Click Create.

  5. You will be redirected to the object browser.

Note

You will not be charged for empty buckets.

Now that your bucket is ready, you may choose to Upload files through the object browser or set bucket permissions to enable CLI access.

Add Permission to Your Bucket

Once you have created a bucket, you need to provide public access to your bucket.

  1. Select the bucket you have created.

  2. Click on Permission and select the Make Public option.

    Make Public Screenshot

  3. Select your type of access role (Upload/Download) and click on Save Permission.

    Save Permission Screenshot

  4. The contents of your bucket will now be available for public access using the object path prefixed by the following URL:
    https://objectstore.e2enetworks.net/Your_Bucket_Name/.

Create Distribution with CDN Service

Once you have created a bucket, you need to create a distribution on CDN to get the distribution URL.

  1. Go to Other Service > CDN Service option in the sidebar menu.
  2. Click on the Create Distribution icon.
  3. Enter the following options.
Origin Domain Name (example.com*) - objectstore.e2enetworks.net
Origin path (E.g: /static) - /your_bucket_name
Origin ID - objectstore.e2enetworks.net
  1. Enter your Origin, Cache, and Distribution settings.

    tip

    You can refer to the tooltip on the left side of each option to get information about your options.

  2. Once all the settings have been entered, click on Create Distribution.

    Note

    Creation of the distribution will take around 10 to 15 minutes.

    Distribution Creation Screenshot 1
    Distribution Creation Screenshot 2

  3. After creating the distribution, you can access your bucket content using the Distribution URL. Create a respective alias for this URL in the DNS panel to access your website with your domain.