0
votes

I am trying to configure the redirection for all http traffic to https only. My configuration as follows

  • We are using ELB and EC2 instances
  • Configured application Load Balancer in this case.
  • Backend server is working on port 443, using Nginx
  • Configured Nginx redirection rule for http to https redirection
  • Configured ELB listener for both port 80 and 443
  • Installed SSL Certificate in both backed servers and ELB

My Issue is when a client accesses this application over https URL is working fine in https. But when the clients try to connect this application over http, it is working in http and not redirect it into https.

I need to work this application only in https. How can we force all client communication into https?

1
Please share your nginx configuration / redirect rule. - Eytan Avisror

1 Answers

0
votes

Are you checking the right values in the redirect settings? The ALB should set x-forwarded-port and x-forwarded-proto.

Another option would be to use cloudfront in front of your ALB, and set it to force everything to https.