I'm on a mac (osx 10.9.3) running CentOS7 in virtualbox. I would like to access the website hosted on the virtual machine. Browsing to the Guest IP returns webpage not available.

I'm able to ping and ssh to the VM.
I've set bridged adapter for the network settings in the VM.
I've given /etc/httpd/conf/httpd.conf Listen 80 and host IP address. telnet and curl to Guest IP returns connection refused.

I'm guessing it's a firewall / iptables configuration problem where I need to allow the host. How do I configure CentOS firewall / iptables to allow host?

  • 1
    post your firewall rules: service iptables status please, and be sure that httpd is running service httpd status – Nidal Jul 20 '14 at 14:20
  • CentOS7 doesn't recognize service command.. really annoying – RobSeg Jul 20 '14 at 14:23
  • try /etc/init.d/httpd status – Nidal Jul 20 '14 at 14:24
  • returns "no such file or directory" Isn't there an official alternative to these commands? Or a download to get them. example: I needed to download net-tools to get ifconfig to work.. – RobSeg Jul 20 '14 at 14:26

you are able to ping and ssh to the VM, So I guess it is not a firewall problem, I guess your httpd service isn't running:

try to run it using:

service httpd start


/etc/init.d/httpd start

httpd should installed on centos by default!!!!, to install httpd you can simply do this on centos:

yum install httpd

to set the apache service to start on boot(to avoid such a problem again):

chkconfig httpd on
| improve this answer | |
  • httpd is installed. I'm having problems with starting the httpd service. Both service httpd start and /etc/init.d/httpd start don't work. I'll look into getting these commands working, thank you. If this gets it working i'll accept answer – RobSeg Jul 20 '14 at 14:36
  • Apache is running. '/bin/systemctl status httpd.service' returns 'active(running)' and in 'ps -aux' there are about 5 processes called apache. Still can't acces the webpage. – RobSeg Jul 21 '14 at 9:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.