Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 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

share|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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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