I will try to be as precise as possible with my issue and question!
- I have a certificate generated by Amazon Certificate Manager
- I have a cloudfront with the certficate and it has origin of EC2 public DNS
- The connected EC2 has Nginx listening on port 80
The issue is I am getting Too Many Redirection...
Redirection is from xxx.com to www.xxx.com/?sid=xxxxxxxx endlessly..
I have set the route 53 to point to EC2 ip and the application works fine without an issue so there is no issue with the webserver..
And if I want to get https working.. because I have no ELB I thought I could make HTTPS Port on Cloudfront to 80 so all traffic goes to Nginx port 80 but it doesn't work the server doesn't respond.
So my question is.
Does anyone have any idea why there is too many redirection? or where to look at?
Do you see any fundamental architecting issue with Certificate from ACM pointing to Cloudfront that connects to EC2 without ELB?
Am I not correct if cloudfront send http and https traffic to ec2 port 80, it should work?
xxx.com to www.xxx.com/?sid=xxxxxxxx
will be seen as the same url by nginx, unless you treat query params on your setup. – Stargazer