0

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?

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

|improve this answer|||||
  • +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 9 '10 at 18:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.