jack x
jack x

Reputation: 23

AWS ELB HTTPS Port forward setting

When I setup the LBS on the aws, I set SSL offload to forward requests from port 443 on ELB to port 80 on the EC2 instances.

I am not sure this is right or not since I saw many people did that. But after I did that I got lots of errors within the browser console:

"This request has been blocked; the content must be served over HTTPS."

Should I change the forward port 80 to 443? and install ssl for each instance?

Upvotes: 2

Views: 568

Answers (1)

300D7309EF17
300D7309EF17

Reputation: 24573

443 to 80 is correct. Your EC2 instance serves plain data, the ELB encrypts it before sending it out of AWS.

There are a few nuances to this- the server thinks it is serving plain content on 80, so if it creates URLs they will typically be http:// without some configuration. (it depends on your framework, server, etc)

The second nuance is that hardcoded URLs will break it in a similar manner. That error message has been explained in a stackoverflow question about Ajax, some form of that is causing your problem.

Upvotes: 1

Related Questions