简体   繁体   English

HTTPS无法与Amazon Cloudfront中的自定义域一起使用

[英]HTTPS not working with custom domain in Amazon Cloudfront

I am trying to configure a custom domain from namecheap to serve my cloudfront distribution. 我正在尝试从namecheap配置自定义域以服务我的Cloudfront发行版。 I did all steps i am aware of but the https is not working. 我做了所有我知道的步骤,但是https无法正常工作。

What i did: 我做了什么:

  1. created cname record for my domain in namecheap: www -> d12312***.cloudfront.net www -> d12312***.cloudfront.net为我的域创建了cname记录: www -> d12312***.cloudfront.net
  2. created and validated amazon certificate from acm (it shows "issued" for www.mysite.info ) 从acm创建并验证了亚马逊证书(显示为www.mysite.info “已发出”)
  3. Edited my cloudfront distribution, included the domain www.mysite.info to the alternate domains section, selected "custom ssl" and selected the certificate i created from step 2. 编辑了我的Cloudfront发行版,将域www.mysite.info包括到“替代域”部分,选择了“ custom ssl”,并选择了我从步骤2中创建的证书。

Now my domain www.mysite.info/test.jpg does show the image hosted from my cloudfront, but the https is not working, showing "not secure", what's wrong ? 现在我的域名www.mysite.info/test.jpg确实显示了从我的云端托管的图像,但是https无法正常工作,显示“不安全”,这是怎么回事?

Please, I don't want to use route 53. 拜托,我不想使用路线53。

Nevermind, it worked after a while. 没关系,一段时间后它起作用了。 Though i struggled with the certificate manager dns verfication. 虽然我在证书管理器dns验证方面遇到了困难。 Amazon asks you to put a cname record like: 亚马逊要求您放置一个cname记录,例如:

Name: _220a646ed9c024bb4e8a234d7224ae.www.mysite.com. 名称:_220a646ed9c024bb4e8a234d7224ae.www.mysite.com。 Type: CNAME Value: _d5983967e8as12f80ae85685bb5ce7.hsdfuiqjoua.acm-validations.aws. 类型:CNAME值:_d5983967e8as12f80ae85685bb5ce7.hsdfuiqjoua.acm-validations.aws。

If you put/update the cname records as shown, it won't work, instead, remove the domain name from the name: 如果按如下所示放置/更新了cname记录,则将无法使用,而是从名称中删除域名:

_220a646ed9c024bb4e8a234d7224ae.www _220a646ed9c024bb4e8a234d7224ae.www

and keep the value as it is. 并保持原样。

wait 10mins 等待10分钟

Hit "continue" in amazon certifcate manager. 在亚马逊证书管理器中点击“继续”。 voila! 瞧! it shows certificate issued. 它显示了颁发的证书。

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

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