Page 1 of 1

apache virtual hosts in guest OS

Posted: 19. Sep 2008, 03:42
by orixilus
Hi,

i set up a VM as follow

VirtualBox: 2.0.2
Host: WinXP SP2
Guest: Ubuntu Hardy
Network: NAT + Port Forwarding
Guest Additions installed

with port forwarding set up to allow requests to port 8080 to be redirected to the port 80 (apache) of the guest operating system.

it's working fine, http://localhost:8080 on the host OS gives me back the apache welcome page of the guest OS.

the problem is how can I reach a virtual host in the guest OS? after setting up my host file like this

127.0.0.1 myvirtualhost

if I try to go to http://myvirtualhost:8080 all I get is the default host.

Posted: 19. Sep 2008, 21:52
by Sasquatch
Never change the 127.0.0.1 address to anything different than localhost.

If you really want to test this, try Host Interface Networking as described in the Manual. You can find some information in the VirtualBox FAQ too.