I’m trying to host an app on apex domain but keep getting error. Here’s what I did.
- Has my own domain (example.com to simplify) on CloudFlare. Full(strict) mode and Always use HTTPS is on.
- On AWS ACM, created and validated a SSL certificate for example.com and *.example.com
- Deployed a simple Nginx ECS service and connected to target group and application load balancer.
- Made a 443 Listener with the SSL certifcate on ALB that has a default rule routing traffic to the Nginx ECS service target group (80 Listener redirects traffic to 443 Listener)
- On CloudFlare, made a CNAME record of example.com targeting the ALB DNS name.
- When I access https://example.com, I get ‘Too many redirections’ ERR_TOO_MANY_REDIRECTS error.
*) When I directly access ALB DNS name using http, I can see Nginx webpage successfully.
How to fix this?
Tried the steps on the body, expected to see Nginx webpage when accessing example.com, but got ‘Too many redirections’ error.