I've been following lynda.com's AWS essential training and I've successfully set up an EC2 instance but when I try to put it behind a load balancer I can not access it through the ELB's public DNS.
On the AWS Load Balancer console it says the status of my instance is OutOfService. As per the tutorial I set up the a health check for the load balancer with a path of /heartbeat.php
.
I also have two security groups set up. The first one is named Load Balancer - Prod which allows HTTP traffic on port 80
in from anyone. My Load balancer belongs to this security group. Additionally I have a security group called Web Tier - Prod which only allows HTTP traffic on port 80
from the Load Balancer - Prod security group and my own IP, SSH on my IP and MYSQL traffic from itself, the Web Tier - Prod security group.
I can access the instance with it's own public DNS and I can SSH into it, I just can't access it via the load balancers public DNS.
When I ssh into it and chack the NGINX access logs, I see this logged many times.
172.??.??.?? - - [26/Aug/2015:16:43:46 +0000] "GET /heartbeat.php HTTP/1.1" 401 203 "-" "ELB-HealthChecker/1.0"
I should be seeing a 200 status code instead of 401 203 I guess. I tried changing permissions on /var/www/
to 777 recursively as a test but that made no difference.