Access localhost from vm

I need to access my local environment from inside vm. There are some messages on how to do this, but I need to have access to my local host by typing "localhost" in the address bar, because it uses facebook authentication, and if the domain is not recognized, it does not work.

How can I set so that "localhost" in my vm points to "localhost" outside of vm?

+7
source share
1 answer

You can change the IP address of the local host to any host IP in your hosts file.

If the vm machine is a window, the file is located in the c: \ windows \ system32 \ drivers \ etc \ hosts directory

just open 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 try

+9
source

All Articles