Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatically redirect HTTP to HTTPS in AWS ELB

I want to redirect all of my HTTP requests to https in AWS. I use ELB for ssl certificate and using ubuntu(64-bit) os.

like image 626
vijay Avatar asked May 17 '26 16:05

vijay


1 Answers

You have two options:

1) Use cloudfront in front of your ELB, and configure it to force everything to HTTPS

2) Add a rewrite rule to your web server configuration to redirect to https. Note that you will need to check X-Forwarded-Proto to determine if the original request was secure or not.

like image 166
chris Avatar answered May 19 '26 13:05

chris



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!