Skip to content

Instantly share code, notes, and snippets.

@rbg246
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rbg246/5af38b48afb45bd77fa8 to your computer and use it in GitHub Desktop.
Save rbg246/5af38b48afb45bd77fa8 to your computer and use it in GitHub Desktop.
Virtual Box - Setup, linking Virtual box with your computer's localhost and vhosts
Reference: http://stackoverflow.com/questions/1261975/addressing-localhost-from-a-virtualbox-virtual-machine
In Virtual Box - running Windows:
You can reach your localhost via:
http://10.0.2.2
If you need to link to vhosts on your localhost though you need to update the virtual box's hosts file
Enable Notepad to be run as administrator
http://www.7tutorials.com/how-run-programs-administrator-windows-7
Edit the hosts file
windows/system32/drivers/etc/hosts using notepad as admin app
and enter:
10.0.0.2 vhosted-domain.dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment