node.js - AWS Elastic Beanstalk - NodeJS : Get certificate SSL from Letsencrypt without Beanstalk Load Balancer

标签 node.js ssl nginx amazon-elastic-beanstalk lets-encrypt

对于我在 Elastic BeanStalk 中的 nodejs 应用程序,没有 Beanstalk 负载均衡器,我想设置一个 Letsencrypt 证书并保留 AWS 提供的经典域:xxx.xxxx.elasticbeanstalk.com

经过多次搜索,我找到了两种可能的解决方案:

1 - 使用 .ebextensions 文件 => 安装 Certbot,获取 Letsencrypt 证书并配置 Nginx。

很棒的帖子 => https://bluefletch.com/blog/domain-agnostic-letsencrypt-ssl-config-for-elastic-beanstalk-single-instances/

2 - 通过 ssh 连接,安装 Certbot,生成证书并将其上传到 IAM AWS。

AWS 文档:https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https-ssl-upload.html

对于这两种解决方案,我在 Certbot 的域验证过程中收到相同的错误消息。

我认为无法访问由 certbot 生成的用于验证的目录..

错误:

To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.

所以,我的问题是:在没有 Beanstalk 负载均衡器的情况下,设置 SSL 证书以获得 Node Js Elastic BeanStalk 应用程序绿色锁定的最佳方法是什么?

感谢您的帮助。

最佳答案

我终于找到了解决方案:

我从这个 script 中得到灵感并使用 WEBROOT 模式创建了一个。

我创建了一个 git 来分享这个解决方案:

https://github.com/SammyHam/LetsEncrypt-SSL-config-for-Elastic-Beanstalk

关于node.js - AWS Elastic Beanstalk - NodeJS : Get certificate SSL from Letsencrypt without Beanstalk Load Balancer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48386839/

相关文章:

node.js - 关闭 Docker 容器上的 Puppeteer 脚本

node.js - 使用 Node js 授予 OAuth2 密码

node.js - 在 npm 中安装 npm 和 bower 的一个命令?

ssl - 在 centOS 7.x 上使用 https 配置的 AWX-Ansible

ssl - Nginx - 仅在 SSL 证书存在时启用 SSL

python - 如何修复 "Error during WebSocket handshake: Unexpected response code: 400"错误

node.js - 通过邮件回复解锁一个nodejs程序

javascript - 使用 https 进行服务器端 API 调用的 Nuxt.js 问题

php - MySqli 插入海量数据

nginx - HAProxy 与 Nginx