如何使 Amazon EC2 不会在浏览器中导致 SSL 无效错误
我对在 Amazon EC2 计算机实例中设置的网站使用 SSL 证书。 SSL 证书适用于一个域名,该域名不是 Amazon 机器实例的公共 DNS。浏览器总是抱怨域名不匹配,因为它将 SSL 证书的域名与 Amazon 公共 DNS 进行比较。
我该如何设置才不会出现这个问题呢?
我尝试了域名转发和A记录设置。
可能是因为我对Amazon EC2不太熟悉,没有正确配置域名。
任何帮助将不胜感激。
I use SSL certificate for a web site I set up in Amazon EC2 Machine Instance. The SSL certificate is for one domain name, which is not public DNS for the Amazon Machine Instance. The browser always complains the mismatch in the domain name because it compares the domain name of the SSL certificate to the Amazon public DNS.
How can I set up not to cause this problem?
I tried both domain name forwarding and A Record setting.
Maybe it's because I'm not so familiar with Amazon EC2 and I haven't configured domain name correctly.
Any help will be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
浏览器会将您在地址栏中输入的域名与证书中的域名进行比较。如果它们不同,那么就会出现错误:这是设计使然。
“修复”此问题的方法是为您在浏览器中输入的任何域名购买证书以访问 EC2 实例:mywebsite.com,而不是 ec2-xyz.compute-1.amazonaws.com 或其他...
The browser compares the domain name that you've typed in the address bar with the domain name in the certificate. If they're different then there's an error: that's by design.
The way to "fix" this is to buy a certificate for whatever domain name you type into the browser to get to the EC2 instance: mywebsite.com, not ec2-x-y-z.compute-1.amazonaws.com or whatever...
之后实例就有了 IP,如果需要,您可以用它设置域名。最简单的方法是您可以通过像 EveryDNS 这样的 DNS 服务来使用。只需向您的域名注册商提供 EveryDNS 的域名服务器、创建 EveryDNS 帐户、添加您的域并使用您新关联的 EC2 实例 IP 地址创建 A 记录。
之后,您必须获得该域名的证书。如果您执行这些步骤但仍然遇到问题,请告诉我。
您还可以阅读此处了解更多详细信息。
在您查看 亚马逊论坛 之前我遇到了同样的问题确切答案
After that the instance has an IP you can setup a domain name with it if you want. The easiest way is you can use through a DNS service like EveryDNS. Just provide your domain name registrar with EveryDNS’s domain name servers, create an EveryDNS account, add your domain and create an A record with your newly associated EC2 instance IP address.
after that you have to get a certificate for that domain name.If you do these steps and still having problems pls let me know.
also you can read here for further details.
and i faced same problem before you can check the amazon forums for the exact answer