我正在尝试使用一个证书保护通过 AWS Cloudfront CDN 交付的多个静态 AWS S3 网站。
这篇 AWS 文章说我应该能够做到这一点,但它不起作用。
一个是网络应用程序,另一个是用于营销网络应用程序的网站。
您会在下面注意到大多数设置都是相同的。Cloudfrount CDN 和 GoDaddy DNS 中的 CNAME 设置基本上都是不一样的。
Certificate settings / details:
- Domain name: mydomain.us
- Additional names: *.mydomain.us
- Validation status: Success
- Associated resources: arn:aws:cloudfront::[accountkey]:distribution/[CDN1] & same/[CDN2]
.
CDN 1 (web-app) settings:
- Origin = web-app.s3.amazonaws.com
- CNAMEs = *.mydomain.us
- SSL Cert = mydomain.us
- Domain name = [app].cloudfront.net
DNS 1 (web-app) settings:
- CNAME = * | [app].cloudfront.net
*Site 1 (the web-app) successfully loads secured in HTTPS.
- app.mydomain.us, custom.mydomain.us, etc.
.
CDN 2 (web-site) settings:
- Origin = web-site.s3.amazonaws.com
- CNAMEs = www.mydomain.us and web.mydomain.us
- SSL Cert = mydomain.us
- Domain name = [site].cloudfront.net
- All other settings such as security policy, HTTP versions, viewer protocol policy and everything I can see are the same as CDN 1.
DNS 2 (web-site) settings:
- CNAME = web | [site].cloudfront.net
- CNAME = www | [site].cloudfront.net
*Site 2 (the web-site) does not load secured
- web.mydomain.us or www.mydomain.us
所有 S3 设置都相同,少了 Web 应用程序的 CORS 策略,因此我可以从 custom.mydomain.us 获取托管在 app.mydomain.us 的资源。
我需要更改什么才能使其正常工作?
先感谢您!