Reputation: 23
I created a VPC .I did not create the NAT gateway but created IGW for my public subnet and then launched and EC2 in my public subnet. When I try to hit the public DNS (IPV4) in the browser I am not able to access the instance , I can SSH and access though . I have configured the security group for inbound all SSH and HTTP and outbound All . Also the route table is updated with the IGW entry . What can be wrong ?
Upvotes: 1
Views: 124
Reputation: 35188
As you're having no httpd service being found on your server, the reason you can not connect is that no httpd service is running to serve traffic over HTTP (port 80).
Try running the user data script manually and ensure you're on a RHEL distribution based instance (such as RedHat, CentOS or Amazon Linux).
If you're running debian based (such as apache) you would instead install it by running the below command.
apt-get update
apt-get install apache2
systemctl start apache2
Upvotes: 2