Skip to content
Advertisement

Apache not seeing website – CentOS 7

I have setup a lot of Virtual Hosts in Ubuntu but today I needed to do this on a CentOS 7 server. I installed Apache and setup the VHost config but nothing appears when I view the site.

I know that Apache is reading my Config files because if I add a fault in it and restart Apache, it complains about the error. Is there something “else” that is needed on CentOS 7?

Advertisement

Answer

So the answer to this was that the CentOS server had (by default) blocked the HTTP port 80. This really seems a bit silly but as soon as I allowed the firewall to open these ports for the web traffic, all worked fine:

iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement