Getting localhost to work over HTTP in VirtualBox

December 2nd, 2009 by Alex Cabal Leave a reply »

For some reason, VirtualBox doesn’t consistently resolve localhost to the host machine’s IP. Sometimes it’ll work, sometimes it’ll bounce you to the dns error page. To fix this, just add this to your c:\windows\system32\drivers\etc\hosts:

10.0.2.2 [your computer name]

That’s it–you should now be able to do things like http://localhost:8080/

Advertisement

Leave a Reply