Reputation: 12235
I need to access my local environment from inside a vm. There's several posts about how to do this, but I need to be able to access my localhost by typing "localhost" in the address bar, because it uses facebook authentification, and if the domain is not recognized, it doesn't work.
How can I set so that "localhost" in my vm points to "localhost" outside the vm ?
Upvotes: 9
Views: 6628
Reputation: 768
you can change the IP address of the localhost to whatever the IP of the host has in your hosts file.
If the vm machine is windows the file is located at c:\windows\system32\drivers\etc\hosts
just open up the hosts file in notepad and edit
127.0.0.1 localhost
to
192.168.0.1 localhost
not sure if it works, but you can atleast try
Upvotes: 10