20
6
I have an Apache server running on a server:
[root@te-srv2 ~]# ps -ecf|grep httpd
root 698 32047 TS 19 10:45 pts/24 00:00:00 grep httpd
root 32081 1 TS 19 10:16 ? 00:00:00 /usr/sbin/httpd
apache 32083 32081 TS 19 10:16 ? 00:00:00 /usr/sbin/httpd
apache 32084 32081 TS 19 10:16 ? 00:00:00 /usr/sbin/httpd
....
However, when I try to connect to local host I get "Connection refused":
[root@te-srv2 ~]# wget http://127.0.0.1
--2014-02-24 10:46:16-- http://127.0.0.1/
Connecting to 127.0.0.1:80... failed: Connection refused.
Same happens when I try to connect to the local IP address:
[root@te-srv2 ~]# wget http://132.70.6.157
--2014-02-24 10:46:40-- http://132.70.6.157/
Connecting to 132.70.6.157:80... failed: Connection refused.
On the other hand, when I try the same from another computer in the same network, I get a different error "No route to host":
[erelsgl@erel-biu ~]$ wget http://132.70.6.157
--2014-02-24 10:49:11-- http://132.70.6.157/
Connecting to 132.70.6.157:80... failed: No route to host.
Why am I getting these errors? And what should I do to be able to connect to the http server from both the same computer and other computers in the network?
UPDATES: Based on the comments and answers, here is some more information:
[root@te-srv2 ~]# traceroute 132.70.6.157
traceroute to 132.70.6.157 (132.70.6.157), 30 hops max, 60 byte packets
1 te-srv2 (132.70.6.157) 0.082 ms 0.007 ms 0.005 ms
[erelsgl@erel-biu ~]$ traceroute 132.70.6.157
traceroute to 132.70.6.157 (132.70.6.157), 30 hops max, 60 byte packets
1 te-srv2 (132.70.6.157) 0.446 ms !X 0.431 ms !X 0.420 ms !X
[root@te-srv2 ~]# netstat -lnp|grep http
tcp 0 0 :::443 :::* LISTEN 5756/httpd
Can you
traceroute 132.70.6.157
from both servers and compare the output? – Werner Henze – 2014-02-24T10:29:37.9731443 is the SSL-ports (https). Check your configuration to ensure you listen to http port 80. – Mikpa – 2014-02-24T13:17:43.120