在负载平衡器配置HTTPS后无法访问HTTPS站点弹性魔豆平衡器、负载、弹性、无法访问

2023-09-11 08:46:52 作者:南音雨阁

我有一个标准的弹性魔豆的应用程序设置和通过HTTP运行伟大。有一个EC2实例(现在),并且所述域配有一个CNAME指向负载平衡器。继在AWS文档,我输入的SSL证书和配置负载平衡器这样:

I have a standard Elastic Beanstalk app set up and running great over HTTP. There is one EC2 instance (for now), and the domain is configured with a CNAME pointing to the load balancer. Following the instructions in the AWS documentation, I inputted the SSL certificate and configured the load balancer as such:

负载均衡协议:HTTPS 负载均衡器端口:443 实例协议:HTTP 实例端口:80 密码:[默认] SSL证书:myCert

的变化看起来就像他们已经应用;在负载均衡器的描述,我认为:

The changes look like they have been applied; in the load balancer description, I see:

Port configuration: 
80 (HTTP) forwarding to 80 (HTTP)
    Stickiness: Disabled

443 (HTTPS, Certificate: myCert) forwarding to 80 (HTTP)
    Stickiness: Disabled

不过,我不能在HTTPS负载均衡器URL或我的域的HTTPS URL,访问该站点。请求超时。该HTTP网站将继续正常工作。

However, I cannot access the site at the HTTPS load balancer URL or my domain's HTTPS URL. Request times out. The HTTP site continues to work well.

有没有额外的配置我必须做的,对HTTPS服务器响应?我是正确的假设,有没有在应用程序级别所需的配置,因为SSL终止于负载均衡和应用程序将继续讲的HTTP?

Is there any additional configuration I have to do to have the server respond on HTTPS? Am I correct in assuming that there is no configuration required at the app level, since SSL is terminated at the load balancer and the app will continue to speak HTTP?

推荐答案

我怀疑你所缺少的是让您的负载均衡器的安全组访问您的实例。

What I suspect you are missing is allowing access to your instance from your load balancer's security group.

您可以看到负载均衡器的安全组的位置:

You can see the load balancer's security group here:

然后你可以看到它添加到您的网站实例的安全组:

Then you can see add it to your instance's security group here: