My VM cannot see http://localhost:8080/

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
rsablosky
Posts: 1
Joined: 6. Oct 2008, 01:22

My VM cannot see http://localhost:8080/

Post by rsablosky »

I have Mac OS 10.5.5 running VirtualBox 2.0.2, which contains a virtual WinXP Pro SP3.

The Mac has a web server (a Zope instance) running locally, which I can access at http:/localhost:8080 -- but *not* from the VM. Windows browsers do not see it, they just time out.

How do I tell the guest where the host's "localhost" is?
ChrisA
Posts: 11
Joined: 12. Sep 2008, 14:09

Post by ChrisA »

The localhost would refer to your XP machine. To get it to see your webserver on your mac you'd need to edit the hosts file at /Windows/System32/drivers/etc/ and add an entry to point your browser request to your Mac's IP e.g:

macbook 192.168.0.1
(obviously use the IP your macbook is on and not this one)

Then in your browser you'd type http://macbook:8080/ and it should find the webserver there.

There's probably a better way to do it but that should get you up and running.
Post Reply