Using HTTPS with Elastic Beanstalk
We wanted our app to start pushing every request to HTTPS redirecting any HTTP requests. ELBs can redirect, so we set up a little NGINX on our app server instances to redirect any requests to port 81 to 443. That way the rails server can sit obliviously on 80 and answer requests.
Configuring the ELB from EB is totally broken. This page is not very useful:
So we hopped over to the underlying EC2 config. Once there, you can find the relevant ELB and edit the listeners. ELB port 80 to instance port 81 and ELB port 443 to instance port 80:
But then you need to poke some holes in the security groups to allow all these new ports. For the ELB security group you need to allow traffic from port 443:
And you need to allow the ELB to send traffic on port 81:
And the instance security group needs to allow traffic from port 81:














