I am using ECS for WordPress site and using Application Load Balancer (ALB) for load balancing and offloading SSL. ALB is using 2 different listeners on both port 80 and 443. The redirection rule is attached to the port 80 listener which is:
Redirect tohttps://#{host}:443/#{path}?#{query}
Status code:HTTP_301
The webserver is nginx with php-fpm and listening on port 80. There is no redirection being done at nginx.
So, basically what I want is http (user req) -> https (ALB redirection) -> http (nginx)
Now the problem is that the ALB is not redirecting the http traffic for the main home page like
http://example.com -> http://example.com (ALB no redirection) -> http://example.com (nginx)
but it works with the same domain but different URL like:
http://example.com/page -> https://example.com/page (ALB redirection) -> http://example.com/page (nginx)
Edit: Here is the link to the ALB listener rules.
If the other answer doesn't work, double-check that your Security group allows inbound connections on port 80
Description. Scroll down to Security Groups to find your security group
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With