This question already has an answer here:
I have two VMs on CentOS 6.5, running Plesk 12, and the webserver is Apache 2.2. One is a clone of the other, and I inherited them setup by someone else. My problem is that I can access my sites hosted on the servers from any computer other than these servers themselves.
Say example.com points to one of my servers. If I am SSH'd into either of the servers and run
wget example.com I will get back:
--2014-10-20 18:01:42-- http://example.com/ Resolving example.com... <ip address> Connecting to example.com|<ip address>|:80... failed: Connection timed out. Retrying.
The IP address it resolves to is correct. If I run
wget on the servers using the IP address directly I have the same result negative result.
If I run
wget to the same domain on a computer outside these VMs I resolve to the same correct IP, and I am connected. Using localhost on the VMs does work fine:
wget localhost --2014-10-20 18:12:35-- http://localhost/ Resolving localhost... 127.0.0.1 Connecting to localhost|127.0.0.1|:80... connected.
The problem seems to be that the servers don't know what to do when they get to the IP address, and I'm at the end of my knowledge in this area. Any direction on this is appreciated!