Browsing website hosted in the virtual machine from host machine’s browser

network-adaptervirtual-hostvirtualbox

I have installed Oracle VM Box and created a Virtual machine. Now I have hosted(in IIS) a website in the virtual machine. I want this website to be browsed in the host machine's browser.

Can anybody let me know the settings needs to be configured.

Best Answer

Make sure the "network card" on the virtual machine is set to use bridged mode. This will give it an IP on the same subnet as your host machine.

Eg. If your host machine is 192.168.1.10, the virtual machine should get 192.168.1.X. This can vary depending on your network setup, but that's the usual case.

I figure you've already done these two, but you should also make sure your web server is set up to accept requests that did not originate from itself (localhost/127.0.0.1), since the server views the host as a separate machine.

And lastly, make sure Windows' firewall or any other firewall you have running on the VM is configured to allow the web server to accept incoming connections.

Related Question