我正在尝试让我的 AWS Elastic Beanstalk 环境使用 HTTPS...但是,当我在浏览器中打开我的网站时,它显示不安全的连接。
我不确定这是否是我的安全组或负载均衡器配置的问题...
最佳答案
您应该为您环境的负载均衡器分配一个证书:
Open the Elastic Beanstalk console.
Navigate to the management page for your environment.
Choose Configuration.
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.
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.
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/