I am running CentOS 7 in an ESXi VM. I have disabled iptables and selinux. And I am simply trying to run Apache on this version of CentOS 7, which I think is working fine:
[root@am1 etc]# systemctl status httpd.service
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
Active: active (running) since Mon 2015-12-14 11:17:31 EST; 2h 7min ago
Process: 16028 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS)
Main PID: 16033 (/usr/sbin/httpd)
Status: "Total requests: 3; Current requests/sec: 0; Current traffic: 0 B/sec"
CGroup: /system.slice/httpd.service
├─16033 /usr/sbin/httpd -DFOREGROUND
├─16034 /usr/sbin/httpd -DFOREGROUND
├─16035 /usr/sbin/httpd -DFOREGROUND
├─16036 /usr/sbin/httpd -DFOREGROUND
├─16037 /usr/sbin/httpd -DFOREGROUND
├─16038 /usr/sbin/httpd -DFOREGROUND
└─16039 /usr/sbin/httpd -DFOREGROUND
Dec 14 11:17:31 am1 systemd[1]: Started The Apache HTTP Server.
[root@am1 etc]#
The instance of CentOS answers ping, allows connections using ssh, but does not answer any web requests even though it is listening on port 80.
[root@am1 etc]# netstat -anp |grep httpd
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 16033/httpd
tcp6 0 0 :::443 :::* LISTEN 16033/httpd
unix 3 [ ] STREAM CONNECTED 117080 16033/httpd
On the localhost at command line, wget responds:
[root@am1 etc]# wget http://127.0.0.1/ -O /dev/null
--2015-12-14 11:24:26-- http://127.0.0.1/
Connecting to 127.0.0.1:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
2015-12-14 11:24:26 ERROR 403: Forbidden.
[root@am1 etc]#
However, from another machine, Firefox (the same Firefox session I'm using to write this question) returns this error:
Firefox can't establish a connection to the server at x.x.x.x
Firefox can see other machines on the local network on port 80. The only difference on this CentOS installation is that I'm running it in an ESXi VM.
Is there anything I need to configure on the ESXi server to allow port 80 traffic? Since the system answers ping and allows connections using SSH, I do not know why port 80 does not answer across the network. Again, other systems on this same network answer on port 80 without issues.
Anyone else have this problem? (Or better, a solution?)