简体   繁体   English

SSL 不适用于 AWS 上的 Route 53 域

[英]SSL is not working for Route 53 domain on AWS

I've deployed my Django app on AWS Elastic Beanstalk Linux instance.我已经在 AWS Elastic Beanstalk Linux 实例上部署了我的 Django 应用程序。 I've used Route 53 to point it to a custom domain from GoDaddy.我使用 Route 53 将其指向来自 GoDaddy 的自定义域。

Now I want to use SSL for my website.现在我想为我的网站使用 SSL。
I don't want to use Load Balancers for SSL since I'm using only 1 instance and it's costly to pay $18/month.我不想将负载均衡器用于 SSL,因为我只使用了 1 个实例,而且每月支付 18 美元的费用很高。
So what I did is using Let's Encrypt SSL by adding 00_apache_ssl.config file in my .ebextensions folder.所以我所做的是通过在我的.ebextensions文件夹中添加00_apache_ssl.config文件来使用 Let's Encrypt SSL。

I've followed this tutorial to use the SSL.我已经按照教程使用 SSL。 My SSL is working perfectly for Elastic Beanstalk URL.我的 SSL 非常适合 Elastic Beanstalk URL。 But the problem is it's not working for my custom domain.但问题是它不适用于我的自定义域。

My EB Url is showing secure connection while it's custom domain is showing Insecure connection.我的 EB Url 显示安全连接,而它的自定义域显示不安全连接。 What I'm lacking of?我缺什么? Do I need to do some changes in Route 53 Record sets as well?我是否还需要对 Route 53 记录集进行一些更改?

Thank you.谢谢你。

Edit 1: My custom domain is showing the Let's encrypt certificate as Invalid Certificate.编辑 1:我的自定义域显示让我们加密证书为无效证书。

According to your tutorial, you have got an SSL certificate for your elasticbeanstalk domain, not your custom domain.根据您的教程,您已经获得了elasticbeanstalk域的 SSL 证书,而不是您的自定义域。

If you want to access your website via your custom domain with https (for eg https://my-cust-doamin.com ), you have to get a certificate for your domain.如果您想通过带有 https 的自定义域(例如https://my-cust-doamin.com )访问您的网站,您必须为您的域获取证书。

You can obtain SSL certificate from any provider who sells SSL certificates.您可以从任何销售 SSL 证书的提供商处获取 SSL 证书。

Note: You can also get a wildcard certificate(*.my-cust-domain.com), which could be used with any of your sub domains.注意:您还可以获得通配符证书 (*.my-cust-domain.com),它可以与您的任何子域一起使用。

reference: https://rickchristianson.wordpress.com/2013/10/31/getting-a-django-app-to-use-https-on-aws-elastic-beanstalk/参考: https : //rickchristianson.wordpress.com/2013/10/31/getting-a-django-app-to-use-https-on-aws-elastic-beanstalk/

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

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