简体   繁体   中英

EC2 Load Balancer Instance Protocol and Port

I have an elastic load balancer that works properly when configured like so:

Load Balancer Protocol: HTTPS
Load Balancer Port: 443
Instance Protocol: HTTP
Instance Port: 80

However, if I attempt to change the instance protocol to HTTPS and instance port to 443, my server stops responding.

What do I have to do in order for my instance port to be 443?

The reason I want my instance port to be 443 is that my Rails app must verify that the incoming connection uses SSL, but this way, this check fails.

You need to change the way your application detects whether or not the client is using SSL.

The port on the server won't give you that information. You may want to look at the ELB documentation and see if you can use X-Forwarded-Proto or X-Forwarded-Port.

Your instance server has to be able to respond on port 443, with a valid HTTPS response.

That generally means you have to install a signed SSL cert and configure your web server to use it.

Without knowing what web server you are using, I can't give specific instructions.

For instance, if you are using Apache, you need to install something like mod_ssl.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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