简体   繁体   English

记录名称路由到云端

[英]Record name route to cloudfront

My cloudfront distribution have "*.example.com" as CNAMEs and a loadbalancer as origin.我的云端发行版将"*.example.com"作为CNAME ,将负载均衡器作为来源。 I route traffic from my route53 records directly to my cloudfront distribution domain name .我将来自我的 route53 记录的流量直接路由到我的云端分发域名 Some records have subsubdomain named randomly.一些记录具有随机命名的子域。 So they look like this: "sub1.sub2.example.com" , "sub3.sub4.example.com" .所以它们看起来像这样: "sub1.sub2.example.com""sub3.sub4.example.com" I don't know if it is ok because sub1 and sub3 are subsubdomain so they are not contain in "*.example.com" .我不知道是否可以,因为 sub1 和 sub3 是子子域,因此它们不包含在"*.example.com"中。 Will it work?它会起作用吗? By working i mean: The traffic sent to my records will be sent to cloudfront then to my loadbalancer without any issue?通过工作,我的意思是:发送到我的记录的流量将发送到云端,然后发送到我的负载均衡器,没有任何问题?

edit: sub3 and sub4 are random.编辑: sub3 和 sub4 是随机的。

See Using Custom URLs for Files by Adding Alternate Domain Names (CNAMEs) and CNAME Wildcard support for Amazon CloudFront请参阅通过为 Amazon CloudFront 添加备用域名 (CNAME)CNAME 通配符支持来为文件使用自定义 URL

The CloudFront distribution can be configured to handle alternate domains. CloudFront 分配可以配置为处理备用域。 This could be "*.example.com" for all subdomains and should cover the sub sub domains as well.这可能是所有子域的“*.example.com”,并且也应该涵盖子子域。 Alternatively, you should be able to setup "*.sub2.example.com, *.sub4.example.com" if only the sub sub domain varies randomly.或者,如果只有子子域随机变化,您应该能够设置“*.sub2.example.com, *.sub4.example.com”。

In addition, CNAME records need to be setup in Route53 to resolve "*.example.com" to your CloudFront distribution.此外,需要在 Route53 中设置 CNAME 记录以将“*.example.com”解析为您的 CloudFront 分配。

Also worth noting that if you are using HTTPS alternate domain names must be covered by valid SSL/TLS certificates另外值得注意的是,如果您使用的是 HTTPS 备用域名必须由有效的 SSL/TLS 证书覆盖

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM