Static web hosting DNS configuration
Example of assumed DNS settings for a static web hosting.
This is an example of assumed DNS settings, where the first two lines specify the domains of the
gateway instance using a standard S3 interface and point to the IPv4 and IPv6 addresses. The third
line provides a wildcard CNAME setting for S3 buckets using canonical name extensions. The fourth
and fifth lines specify the domains for the gateway instance using the S3 website interface and
point to their IPv4 and IPv6 addresses.
objects-zonegroup.domain.com. IN A 192.0.2.10 objects-zonegroup.domain.com. IN AAAA 2001:DB8::192:0:2:10 *.objects-zonegroup.domain.com. IN CNAME objects-zonegroup.domain.com. objects-website-zonegroup.domain.com. IN A 192.0.2.20 objects-website-zonegroup.domain.com. IN AAAA 2001:DB8::192:0:2:20
Note: The IP addresses in
the first two lines differ from the IP addresses in the fourth and fifth lines.
If using Ceph Object Gateway in a multi-site configuration, consider using a routing solution to route traffic to the gateway closest to the client.
The Amazon Web Service (AWS) requires static web host buckets to match the host name. Ceph provides a few different ways to configure the DNS, and HTTPS will work if the proxy has a matching certificate.
Hostname to a bucket on a subdomain
To use AWS-style S3 sub-domains, use a wildcard in the DNS entry which can redirect requests to
any bucket. A DNS entry might look like the
following:
*.objects-website-zonegroup.domain.com. IN CNAME objects-website-zonegroup.domain.com.
Access the bucket name, where the bucket name is
bucket1, in the following
manner:http://bucket1.objects-website-zonegroup.domain.comHostname to non-matching bucket
Ceph supports mapping domain names to buckets without including the bucket name in the request,
which is unique to Ceph Object Gateway. To use a domain name to access a bucket, map the domain name
to the bucket name. A DNS entry might look like the following, where the bucket name is
bucket2:www.example.com. IN CNAME bucket2.objects-website-zonegroup.domain.com.
Access the bucket in the following manner:
http://www.example.comHostname to long bucket with CNAME
AWS typically requires the bucket name to match the domain name. To configure the DNS for static
web hosting using CNAME, the DNS entry might look like the
following:
www.example.com. IN CNAME www.example.com.objects-website-zonegroup.domain.com.
Access the bucket in the following manner:
http://www.example.comHostname to long bucket without CNAME
If the DNS name contains other non-CNAME records, such as
SOA,
NS, MX or TXT, the DNS record must map the domain
name directly to the IP address. For example:www.example.com. IN A 192.0.2.20 www.example.com. IN AAAA 2001:DB8::192:0:2:20
Access the bucket in the following manner:
http://www.example.com