AWS: Serve up website from private subnet?
I'm unable to get from the internet to a web page hosted on my server in a private subnet.
Using this: How can I place a Webserver in a private subnet in AWS and open it to the world on port 80 as a guide, I've got the following configuration in place:
- VPC w/ 1 public and private subnet (both are in same AZ).
- Public subnet has route table with local and IGW routes
- Private subnet has route table with local and NAT Gateway routes
- EC2 Instance deployed in private subnet serving up static HTML pages
- Confirmed EC2 instance can get out to internet
- ELB pointing (ports 80/443) to EC2 private instance
- (For testing) ELB security group and EC2 SG are set to allow all inbound/outbound traffic
- ELB health check is good
- R53 (A record) for testing subdomain which points to my ELB
With everything supposedly operational and open, I can't determine why the page isn't served back to the user. Chrome just spins and Firefox says the connection was reset. Any advice on how to troubleshoot this?
Solution 1:
Following this: http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/elb-security-groups.html#elb-vpc-security-groups , specifically the section: Internet-facing Load Balancer: Recommended Rules
I needed to update the outbound rules of my ELB to use my instance security group.