I'm just starting with the AWS...
I have 1 EC2 Instance, which is running WordPress (WordPress powered by Bitnami image from the Marketplace - https://aws.amazon.com/marketplace/pp/B007IP8BKQ).
Everything works fine, I can access both front and back-end of the WP installation running from standard HTTP
.
The problem starts when I connect the Instance to the ELB and I'm trying to access the site via the HTTPS
.
I've run through the process of setting up the SSL certificate using the ACM and applied the cert to the ELB. I've also got the 443 and 80 port enabled on the security group for the EC2 instance. The port forwarding on the ELB is set up for both 443 and 80 to go to 80 and my WP config file is set up to check the HTTP_X_FORWARDED_PROTO
header to stop WP getting into an infinite redirect loop.
I think this is all working fine, as I can access the site via the HTTPS and browse the pages. However, when I attempt to log in I am redirected to HTTP and to solve this problem I have set WP site URL and WP home URL to HTTPS. This then results in numerous 503 errors (503 Service Unavailable: Back-end server is at capacity
). From the AWS Dashboard, I can see the Instance is running just fine.
I've researched quite a lot to make sure I have everything set up correctly (some threads I've come across - Link 1 Link 2 ) and everything seems fine (but something is obv wrong).
Any suggestions on how to get the ELB to work?
sudo ls -ltr /var/log
and examine the last few entries is usually a good bet. For ELB classic, see access log collection. The logs are written into S3, where you fetch them and read them. – Michael - sqlbot