Path-Style vs. Virtual-Hosted Style Requests

By default, the S3 proxy accepts requests only in path-style access. This means that you can specify the endpoint hostname as either a FQDN or the IP of the S3 proxy or the load balancer.

However, if you want the S3 proxy to accept virtual-hosted style requests, you can enable it in the storage proxy configuration file. With that configuration, fully qualified hostnames must be used to send requests. If that is impossible, and only a portion of the hostname is used for the request, then the hostname must be added to the storage proxy configuration file (this is explained in detail, below).

  • For the default (in which only path-style access is allowed):

    The endpoint can be http://<ip_address>:<s3_port> or http://<hostname>:<s3_port>

  • To enable virtual-hosted style access:

    In the config.xml file [see Hedvig Configuration File (config.xml)], under the s3 element, add the tag <virtualhostingenabled> and set the value to true. Also, set all load balancer hostnames that may access this S3 proxy in the <hostendpoints> tag (see S3 <s3> Element).

If Virtual-Hosted style access is enabled, in this mode, to determine the style request type and how the bucket name is fetched, consider the following:

  • If the host header field is not available, or if it matches the storage proxy hostname or hostnames specified in the storage proxy’s configuration file, then it is a path-style request.

  • If the host header ends with the <hostendpoints> tag (see S3 <s3> Element), then the request is a virtual-hosted style request. The bucket name is the leading part of the host header field, up to the hostname, that is <bucketname>.<hostname>.

  • If the host header does not match any of the endpoints, then the value of the host header is considered the bucket name. For this to be successful, the CNAME record is set up so that the bucket name can be routed to the host.


  • If virtual-hosted style access is enabled on the S3 proxy, then access with the IP address:port number for specifying the endpoint is not supported.

  • The bucket name must be a DNS-compliant name.