.. tip:: We prefer the first method, because the second method requires expensive domain certification and DNS wild cards.
+.. tip:: You can define multiple hostname directly with the :confval:`rgw_dns_name` parameter.
+
Common Request Headers
----------------------
- name: rgw_dns_name
type: str
level: advanced
- desc: The host name that RGW uses.
- long_desc: This is Needed for virtual hosting of buckets to work properly, unless
+ desc: The host names that RGW uses.
+ long_desc: A comma separated list of DNS names.
+ This is Needed for virtual hosting of buckets to work properly, unless
configured via zonegroup configuration.
- fmt_desc: The DNS name of the served domain. See also the ``hostnames`` setting within regions.
+ fmt_desc: The DNS names of the served domains. See also the ``hostnames`` setting within zonegroups.
services:
- rgw
with_legacy: true
for (const struct rgw_http_status_code *h = http_codes; h->code; h++) {
http_status_names[h->code] = h->name;
}
- std::list<std::string> names;
+ std::list<std::string> rgw_dns_names;
+ std::string rgw_dns_names_str = cct->_conf->rgw_dns_name;
+ get_str_list(rgw_dns_names_str, ", ", rgw_dns_names);
+ hostnames_set.insert(rgw_dns_names.begin(), rgw_dns_names.end());
+
+ std::list<std::string> names;
zone_group.get_hostnames(names);
- hostnames_set.insert(cct->_conf->rgw_dns_name);
hostnames_set.insert(names.begin(), names.end());
hostnames_set.erase(""); // filter out empty hostnames
ldout(cct, 20) << "RGW hostnames: " << hostnames_set << dendl;