Feb 24, 2012
tom

Apache running on CentOS in VirtualBox is not accessible from host machine

Question

I am running CentOS in Virtualbox environment on my Win7 machine. I am able to connect there by SSH from host machine (win7), but Apache’s httpd is not answering.

I can get response in CentOS by curl localhost, curl 172.27.59.38, but IP address doesn’t respond on host machine:

C:\Users\username>telnet 172.27.59.38 80
Connecting To 172.27.59.38...Could not open connection to the host, on port 80:
Connect failed

Also nmap localhost doesn’t show that 80 port is open.

What can be the issue?

Asked by Stas

Answer

If you have sudo rights, try running service httpd status and see if the server is running.

If you find that apache is running, your problem is probably going to be port related- in which case, running system-config-securitylevel-tui will bring up a terminal version of the firewall-management console, which you can then go into and enable the necessary port forwards.

If you find that you still cannot access your httpd server, make sure you’ve opened/forwarded the ports on your router.

Answered by qweet

Related posts:

  1. How to make Sharepoint website running in VMware virtual machine accessible from host?
  2. VirtualBox – Static Guest, accessible from host
  3. Setting up a web server on a virtual machine viewable from the host and all other vms running on the host
  4. Is it possible to make the VirtualBox host machine use dhcp on vboxnet0?
  5. Installing and utilizing VirtualBox on a headless CentOS machine

Leave a comment