Overview

Static Website Hosting feature provides a low-cost, highly reliable solution to deliver content in a COS bucket on a web page.

Static Website Hosting allows a COS bucket to be configured to store static websites which deliver HTML, JavaScript, images, video, and other files via a website. Static Website Hosting does not support any server-side application code, such as PHP or ASP.NET. Static Website Hosting allows the data in the COS bucket to be served using a simple HTTP server.

Static websites are typically used in:
  • Cases where a website requires minimal to no server administration.
  • Websites which have few authors and require infrequent updates.
  • Websites which need to automatically scale for an intermittent increase in traffic.

The Static Website Hosting feature allows a user to configure a Website Configuration Policy for a COS bucket. The Website Configuration Policy for a COS bucket can only be configured by the bucket owner. The Website Configuration Policy for a COS bucket can be configured with index and error object names. Then, the static web server appends the index object name when a request ends in / and returns the error object when there are errors. Optionally, a Website Configuration Policy can be used to globally redirect all requests to another website endpoint, or the policy can setup to provide granular control over redirects by providing routing rules as part of the policy.

The Static Website Hosting feature is supported in both Vault and Container mode systems. Operators may enable the Static Website Hosting feature through the Manager application for specific vaults, and you may add website policies for those vaults or a container on those vaults. All requests processed by the website endpoint will have access logs with interface_type set to s3-website and can be used to differentiate requests. There are accesser device level metrics collected and logged to represent the requests processed by the website endpoint.

To access a bucket as a Static Website, the client addresses the bucket via virtual host addressing, using a virtual host suffix specifically setup for the Static Website Hosting feature, known as the Static Website Virtual Host Suffix. If the Static Website Virtual Host Suffix is static-website.example.com, then to access the COS bucket named ‘bucketname’ you would use http://bucketname.static-website.example.com/ . An Operator is expected to configure their DNS servers to perform proper routing of static website virtual host style addresses to the appropriate Accesser node or Load Balancer IP address. In the above example, the DNS servers should be configured so that all traffic towards *.static-website.example.com will have to be routed towards the Accesser or the Load Balancer.