I had to create an SSL certificate for my domain “farmtrust.tn” using a CloudFront distribution that I've configured this way
Set Origin Protocol Policy to HTTP Only
Minimum Origin SSL Protocol to TLSv1.1_2016
Changed origin to my EC2 instance Public DNS
Set Viewer Protocol Policy to Redirect HTTP to HTTPS
Finally add an Alias record for “farmtrust.tn” pointing to the CloudFront distribution URL.
Note : The connection between the user and the CloudFront URL is using HTTPS and the connection between the CloudFront and the Origin is using http.
Later, when I tried to GET request to the website “https://farmtrust.tn ” using the curl command, I noticed HTTP 302 response.
$ curl -IX GET https://farmtrust.tn
HTTP/2 302
content-type: text/html; charset=utf-8
content-length: 0
location: http://farmtrust.tn/
date: Mon, 23 Dec 2019 16:16:52 GMT
server: Apache/2.4.29 (Ubuntu)
x-cache: Hit from cloudfront
via: 1.1 87ba4da6c7513242d551023ab57badbf.cloudfront.net (CloudFront)
x-amz-cf-pop: MAN50-C1
x-amz-cf-id: BKFMLi_leVgG0Fniw0ZHYlp4fR8T2xJkhWsUs2x1nZRgr-ZnQ6eX-A==
age: 492
I have investigated further and I observed the following loop in routing.
https://farmtrust.tn —> CloudFront url —> EC2 Origin —>WebServer —> http://farmtrust.tn —> CloudFront redirects it to "https://farmtrust.tn ” —> ...
Now when I try to access the website I get ERR_TOO_MANY_REDIRECTS
With Prestashop there are some configurations which is redirecting these requests to a predefined URL. Which is located in tables ps_configuration and ps_shop_url
I'd like to know if I could stop this redirection somehow or what should I do.
Best regards,