- 最新
- 最多得票
- 最多評論
Thank you for the great details. Please allow me to explain with examples, assuming we have:
Sub-domain: cf.example.com
Staging: d123.cloudfront.net
Production: d456.cloudfront.net
Status: alternate domain names was re-assigned to d456.cloudfront.net
, while DNS record cf.example.com
is still pointing to d123.cloudfront.net
.
It would still work as:
- The client resolves
cf.example.com
(as if resolvingd123.cloudfront.net
) and connects to the CloudFront PoP. - The client sends an HTTP request with
Host: cf.example.com
host header. - With this
Host
header, CloudFront learns that this request belongs to the production distribution, where alternate domain name is configured.
I would still recommend to modify DNS record cf.example.com
to point to the correct distribution, for example, to avoid the situation that staging distribution gets disabled. I would also recommend taking a look at this doc to move alternate domain names between distributions without any downtime.
Lastly, the most relevant document would be this one while there are many great re:invent presentations explaining with more details, such as the very beginning of this talk that briefly explains HTTP request lifecycle.
相關內容
- 已提問 7 個月前
- 已提問 1 年前
- AWS 官方已更新 2 年前
- AWS 官方已更新 1 年前
- AWS 官方已更新 1 年前
- AWS 官方已更新 2 年前