user520351
user520351

Reputation:

Can't connect to EC2 instance via web browser

I'm a total newbie when it comes to servers and EC2 but I have an EC2 instance running which was stopped and restarted. Since that I haven't been able to connect via a web-browser to the site but can connect via SSH. Are there any ideas why this could be the case?

Upvotes: 6

Views: 11797

Answers (2)

Kevin
Kevin

Reputation: 413

Here is the debug checklist:

  • Check your server, make sure it is up and running in AWS management console.
  • Check port security setting, from your local machine. If it is close open it in security group.

    
    telnet your_ip 80 # Check http port
    telnet your_ip 22 # Check SSH port
    

  • Check your web server, Apache, Nginx, etc. If you cannot find your process, start it.

    
    ps -ef | grep -e nginx -e httpd -e apache
    

  • Check your virtual host config, make sure you web server is listening to port 80 (http) or 443 (https).

  • Run chkconfig and make sure your web server will start as a service.

Upvotes: 2

Julio Faerman
Julio Faerman

Reputation: 13501

Check the security group in your instance property, it is probably allowing only SSH (default), you may want to add a inbound rule allowing HTTP traffic.

Upvotes: 1

Related Questions