Virtual Hosting

Depending on your needs, you might not want s3.tebi.io to appear on your website or service.

For example, if you are hosting website images on Tebi, you may prefer https://images.your-domain.net/ instead of https://images-my-service.s3.tebi.io/, or https://s3.tebi.io/images-my-service/.

DNS Settings

Your bucket name must be the same as the CNAME.

For example, if you create a CNAME to map images.your-domain.net to images.your-domain.net.s3.tebi.io, both http://images.your-domain.net/filename and http://images.your-domain.net.s3.tebi.io/filename will be the same.

images.your-domain.net CNAME  images.your-domain.net.s3.tebi.io.

Tebi uses the hostname to determine the bucket name. For example, suppose that you have configured www.example.com as a CNAME for www.example.com.s3.tebi.io. When you access http://www.example.com, Tebi receives a request similar to the following:

GET / HTTP/1.1
Host: www.example.com
Date: date
Authorization: signatureValue

Tebi sees only the original hostname www.example.com and is unaware of the CNAME mapping used to resolve the request.

Example

To associate a hostname with a Tebi bucket using CNAMEs:

  1. Select a hostname that belongs to a domain you control. This example uses the images subdomain of the your-domain.net domain.

  2. Create a bucket that matches the hostname. In this example, the host and bucket names are images.your-domain.net. The bucket name must exactly match the hostname.

  3. Create a CNAME record that defines the hostname as an alias for the Tebi bucket. For example: images.your-domain.net CNAME images.your-domain.net.s3.tebi.io.

The procedure for configuring DNS depends on your DNS server or DNS provider. For specific information, see your server documentation, or contact your provider.

HTTPS Support

To make your virtual hosting subdomain accessible over HTTPS protocol, you can issue a free Let’s Encrypt certificate. Our system will request, validate, and install it into the cluster, and update it automatically.

To enable this, open bucket preferences, select the Hosting tab and check the HTTPS Certificate checkbox. Save the form by pressing the Update button. Your certificate will be ready in less than a minute.

Index and Error Files

You can enable website hosting. Doing so will allow you to configure and upload an index document. An index document is a webpage that Tebi returns when a request is made to the root of a website or any subfolder.

For example, if a user enters http://images.your-domain.net in the browser, the user is not requesting any specific page. In that case, Tebi serves up the index document, which is sometimes referred to as the default page.

When an error occurs, Tebi returns an HTML error document. You can optionally configure your bucket with a custom error document so that Tebi returns that document when an error occurs. You can do this by specifying the desired file in the Error file field.

Virtual hosting configuration example