I’m a software developer who runs Scribophile, an online writing group for serious writers, Writerfolio, an online writing portfolio service for freelancers, and Standard Ebooks, a publisher of beautifully-illustrated public-domain ebooks.

Getting localhost to work over HTTP in VirtualBox

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/

Leave a Comment