Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
1  
post your firewall rules: service iptables status please, and be sure that httpd is running service httpd status –  Networker Jul 20 at 14:20
    
CentOS7 doesn't recognize service command.. really annoying –  Harbinger Jul 20 at 14:23
    
try /etc/init.d/httpd status –  Networker Jul 20 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.. –  Harbinger Jul 20 at 14:26

1 Answer 1

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

or:

/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
share|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 –  Harbinger Jul 20 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. –  Harbinger Jul 21 at 9:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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