Oracle Linux 7: web server not reachable

ewok asked:

Here’s my setup. I have a vm running with Oracle Linux 7 installed. I started apache with service httpd start and it started without issue. I’ve created an index.html file in both /var/www/html and /var/www. I’m able to reach the VM from my host machine using ping or ssh, but when I open a web browser and navigate to the IP address, the server doesn’t respond.

I checked netstat -plent and it shows that port 80 is listening:

# netstat -plent
tcp6       0      0 :::80                   :::*                    LISTEN      0          121584     36432/httpd

I’ve looked at several answers that suggest iptables may be the issue, but none of those solutions helped. What else might be causing the problem?

My answer:

You forgot to open the port in the firewall.

For instance.

firewall-cmd --add-service=http

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.