node.js - HTTPS AWS Elastic Beanstalk

标签 node.js amazon-web-services ssl https amazon-elastic-beanstalk

我正在尝试让我的 AWS Elastic Beanstalk 环境使用 HTTPS...但是,当我在浏览器中打开我的网站时,它显示不安全的连接。

我不确定这是否是我的安全组或负载均衡器配置的问题...

load balancer config

security group config

最佳答案

您应该为您环境的负载均衡器分配一个证书:

  1. Open the Elastic Beanstalk console.

  2. Navigate to the management page for your environment.

  3. Choose Configuration.

  4. On the Load balancer configuration card, choose Modify.

    Note

    If the Load balancer configuration card doesn't have a Modify button, your environment doesn't have a load balancer.

  5. On the Modify load balancer page, the procedure varies depending on the type of load balancer associated with your environment.

    Classic Load Balancer

    • Choose Add listener.

    • In the Classic Load Balancer listener dialog box, configure the following settings:

      • For Listener port, type the incoming traffic port, typically 443.

      • For Listener protocol, choose HTTPS.

      • For Instance port, type 80.

      • For Instance protocol, choose HTTP.

      • For SSL certificate, choose your certificate.

    • Choose Add.

    Application Load Balancer

    • Choose Add listener.

    • In the Application Load Balancer listener dialog box, configure the following settings:

      • For Port, type the incoming traffic port, typically 443.

      • For Protocol, choose HTTPS.

      • For SSL certificate, choose your certificate.

    • Choose Add.

      Note

      If the drop-down menu doesn't show any certificates, you should create or upload a certificate for your custom domain name in AWS Certificate Manager (ACM) (preferred), or upload a certificate to IAM with the AWS CLI.

  6. Choose Apply.

引用:https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https-elb.html

编辑:如果您的问题与不受信任的证书有关,请按照以下步骤操作:https://aws.amazon.com/pt/premiumsupport/knowledge-center/acm-certificate-error-https/

If you imported a self-signed certificate using AWS Certificate Manager (ACM), the certificate might not be trusted by some browsers. To resolve this error, Request a Certificate using ACM or contact your CA.

关于node.js - HTTPS AWS Elastic Beanstalk ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52103758/

相关文章:

java - 如何在 ssl 的 java 应用程序服务器中禁用弱密码套件

ios - Node js socket io聊天发送消息通知

javascript - Bull js 阻止 Express api 请求,直到作业完成

amazon-web-services - 如何以编程方式创建ami实例?

amazon-web-services - 按区域限制 cloudwatch 访问

amazon-web-services - Spot实例支持DCOS

c# - Windows 7 上的 SSL 客户端 SSPI 错误

apache - 在没有收到证书错误的情况下强制使用 HTTPS 并剥离 WWW

javascript - SignalR 核心 - 尝试将 clientId 传递给 Hub,无法弄清楚如何接收

javascript - Node.js 页面重定向 AJAX 登录?重定向后使用函数调用?