Jump to content

HTTP to HTTPS redirection looping


Recommended Posts

Hello!  I am testing out PrestaShop in my test environment.  I am using an Apache2 instance on Ubuntu 22.04 on an EC2 instance in AWS.  I have it working just fine without enabling the SSL option.  

I want to use an AWS ACM certificate implemented on an AWS ALB so that the ALB can accept SSL connections and forward them on to the EC2 instance where PrestaShop is running. 

When I go to my https://servernamehere for my PrestaShop store, it keeps redirecting my browser to use http and not https.  On other Apache web sites I work with, I do not see this redirection effect.

How do I tell PrestaShop to stop sending back "use http" in the headers so that the ALB just forwards all https normally into the EC2 instance over http so that my web broswer stays in https?  

There must be a simple setting... ?

Link to comment
Share on other sites

Hi, thanks.  I used that configuration option and got it to work.  In order for that to work, the Apache2 web server that runs in the EC2 instance needs to be set up to use SSL as well.  Because I am using the SSL Cert from AWS ACM, it cannot be installed on the EC2 instance.  The SSL cert is set up in the AWS ALB.  Then a target group is set up to the EC2 instance and redirection rules are set up to direct all inbound 80 to 443 at the ALB and then sends all traffic to the EC2 instance on 443.  This requires using a self-signed SSL cert on Apache2 and it solves the problem.

Edited by bradbunce (see edit history)
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...