Accessing local apache server from virtual box

apache, virtualbox

Solution

I'm running a virtualbox with w7 on wxp. On the host (wxp) i'm running a local apache install. I can access the host apache install from the guest system using ip 10.0.2.2.

I've added an entry to the guest hosts file (windows/system32/drivers/etc/hosts) pointing the domain i want to test to the ip above. Thus: 10.0.2.2 www.domainname.com

From my guest w7 system i can now access www.domainname.com, which is now served from the local apache on my host system. This works including mysql db support on the host.

I found the ip number in this thread: https://forums.virtualbox.org/viewtopic.php?f=8&t=44068

Hope this helps.

Problem

I have apache installed on my machine. And I have windows xp installed on virtual box in the same machine. Can I share apache between them?

Original source