I've reviewed/attempted prior suggestions found on the web to no avail.
I currently have an ELB setup in front of my Nginx reverse proxy which then passes traffic onto 3 distinct ELBs which reside in front of 3 distinct web apps (running on EC2). I need to ensure that traffic coming to the first ELB+Rev Proxy is always SSL. The rev proxy then routes to the various apps depending on the route.
Here is snippet of my nginx/sites-available/example.conf file:
server {
listen 80;
server_name staging.example.com;
return 301 https://staging.example.com$request_uri;
}
server {
listen 443 ssl;
server_name staging.example.com;
ssl_certificate /location
ssl_certificate_key /location
location /app1 {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://ELB
}
}
When using the above, and trying prior information found on the web, once implemented that first ELB would stop working. If I then went directly to the rev proxy traffic wasn't making it through but the page wouldn't error out, it would just be blank.
Questions: 1. Assuming my rev proxy settings above are correct, once traffic becomes https and enters the ELB/Rev Proxy, does it continue on via https to the other ELBs? In other words do those ELBs need to have inbound 443 open, or will 80 work as traffic then switches over to http? 2. Do I need to change any of the settings within my location /app1 configuration, especially the proxy settings?