Snowman
Snowman

Reputation: 32081

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.

Upvotes: 0

Views: 615

Answers (2)

chris
chris

Reputation: 37480

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.

Upvotes: 3

Garreth McDaid
Garreth McDaid

Reputation: 2613

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.

Upvotes: 0

Related Questions