2

I have an AWS EC2 Instance that can be accessed via SSH but will not load via its public IP. The page continually loads and then times out.

I have checked the security group and the following is allowed in luanch wizard 1 (the only security group):

  • HTTP - Port Range 80 - Source 0.0.0.0/0
  • SSH - Port Range 22 - Source 0.0.0.0/0
  • HTTPS Port Range 443 - Source 0.0.0.0/0

Public IP

Any ideas?

Edit* It is an EC2 Instance running Linux, Apache, MySQL and PHP.

2 Answers2

3

The server is accepting connections on port 80 fine:

telnet 52.208.91.148 80
Trying 52.208.91.148...
Connected to ec2-52-208-91-148.eu-west-1.compute.amazonaws.com.
Escape character is '^]'.
^]
telnet>

There is likely an issue in your webserver configuration.

EDIT:

You seem to have a redirect in place in your server config that is redirecting to a server that is not accepting connections:

--2016-10-12 14:42:46--  http://52.208.91.148/
Connecting to 52.208.91.148:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://ec2-52-209-134-209.eu-west-1.compute.amazonaws.com/ [following]
--2016-10-12 14:42:47--  http://ec2-52-209-134-209.eu-west-1.compute.amazonaws.com/
Resolving ec2-52-209-134-209.eu-west-1.compute.amazonaws.com... 52.209.134.209
Connecting to ec2-52-209-134-209.eu-west-1.compute.amazonaws.com|52.209.134.209|:80
cduffin
  • 894
0

You can test the redirection with Curl as below.

curl -I vv 52.208.91.148
HTTP/1.1 302 Moved Temporarily
Server: nginx
Date: Thu, 13 Oct 2016 10:56:12 GMT
Content-Type: text/html
Content-Length: 154
Connection: keep-alive

And if there is some redirection configured, that has been already answered in the another thread..

In Nginx, how can I rewrite all http requests to https while maintaining sub-domain?

check this

C Singh
  • 60