Accessing a CentOS 7 server running on VirtualBox from outside

apache-http-servercentosvirtualbox

Is it possible to access my Apache server from outside the VirtualBox on Google Chrome browser on my host computer? Its running on CentOS 7 on VirtualBox. I have tried connecting to the ip address of the CentOS virtual machine but it didn't work. Its using 'Bridged Adapter' networking in the VM settings and i checked the ip address using the 'ip addr' command. Thanks.

Best Answer

I met the same issue. I fixed it as the following:

  1. In the VM network settings, using 'Bridged Adapter'.
  2. Turn on the port of CenOS7: using the following command in terminal(for example port 8080): $ firewall-cmd --permanent --add-port=8080/tcp $ firewall-cmd --reload

My environment:
Host : Win7 64bit
Guest:CenOS 7