How Do You View the Website That Your Oracle VirtualBox Guest Server Is Presenting with a Web Browser on Your Windows Host?

Problem scenario:  You have a Linux VM guest running on Oracle VirtualBox.  You installed Apache web server on this server.  How do you browse to its website from your Windows host machine?

Solution

#1  Determine the host IP address as configured for the guest.  In Oracle VirtualBox go to Devices -> Network -> Network Settings.  For Adapter1 go to "Advanced" and click the button for "Port Forwarding." The host IP address may be 127.0.1.1.

#2  Open a web browser.  Go to the web page (e.g., http://127.0.1.1/index.html).  

Troubleshooting:  If you are still having trouble, review the steps below.

1.  Verify the file exists in the location you expect it to be. On the back end of the Linux server, use "find / -name httpd.conf"  The "DocumentRoot" stanza will show you which directory path on the Linux server to find the files.

2.  Use this command to see if the Apache web server is running: "ps -ef | grep httpd"
If you do not see a process running, try this command:

apachectl start

3.  Verify no firewall is blocking the connection between your Oracle VirtualBox client and host.  If you are not sure how to do this, you could use a PowerShell command or script on the host.  This posting can help you with that.  You could install nmap on the guest of the Linux server and use that.

Leave a comment

Your email address will not be published. Required fields are marked *