If I set up a web server in a virtual machine, will localhost
/127.0.0.1
be the same on both the virtual and the host machine?
Asked
Active
Viewed 173 times
0

Corey
- 113
- 6
1 Answers
1
Most likely if /etc/hosts
isn't changed on either of them.
Note that 127.0.0.1 is an address given to the loopback interface, i.e it never leaves the machine.
Read more: http://en.wikipedia.org/wiki/Localhost

jgr
- 164
- 4
-
+1 and adding: So assuming the non-modified version of /etc/hosts, locallhost of a vm will be different than localhost of its host. If you want to access host's service from vm, you can use bridged networking or a host only interface, i believe. – Shoaibi Dec 09 '10 at 18:29