简体   繁体   English

我可以使用 Nginx Certbot 将 ssl 放入 aws 默认 ec2 域吗?

[英]Can I use Nginx Certbot to put ssl in an aws default ec2 domain?

我试图输入命令来获取证书,但它给了我这个错误:发生意外错误:服务器不会为标识符颁发证书 :: 创建新订单时出错 :: 无法为“ec2-34-237-242 颁发” -160.compute-1.amazonaws.com”:ACME 服务器拒绝为该域名颁发证书,因为它被策略禁止

Let's Encrypt blocks Amazon AWS domains because the domain names are transient and are subject to change. Let's Encrypt 会阻止 Amazon AWS 域,因为域名是暂时的并且可能会发生变化。

https://community.letsencrypt.org/t/policy-forbids-issuing-for-name-on-amazon-ec2-domain/12692/4 https://community.letsencrypt.org/t/policy-forbids-issuing-for-name-on-amazon-ec2-domain/12692/4

Here's an alternative这是一个替代方案

  1. Create a subdomain (api.example.com) for your domain (example.com)为您的域 (example.com) 创建子域(api.example.com)
  2. Install a reverse proxy (like nginx) on your ec2 instance在您的 ec2 实例上安装反向代理(如 nginx)
  3. Configure SSL for the reverse proxy.为反向代理配置 SSL。
  4. Retain SSL for the app on your ec2 instance as usual.像往常一样为您的 ec2 实例上的应用程序保留 SSL。
  5. Redirect https (and probably http also) traffic to your app in the reverse proxy (like nginx) conf.在反向代理(如 nginx)conf 中将 https(可能还有 http)流量重定向到您的应用程序。

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

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