I am using Elastic Beanstalk with a Node.js server, Load Balanced, and Nginx proxy. I want all addresses http://example.com to be rerouted to https://example.com.
I have tried the config below which lives in .ebextensions and looks like this:
files:
"/etc/nginx/conf.d/000_https_redirect.conf":
mode: "000755"
owner: root
group: root
content: |
server {
listen 80;
return 301 https://$host$request_uri;
}
My Load Balancer has 80 pointing to 80 and 443 pointing to 80:
