Access localhost (not 127.0.0.1 but other..) from a OS installed in virtual machine
I want to check my localhost from the browser of Windows 7 installed in VirtualBox. I have as main OS Ubuntu.
开发者_如何学CWhen I write 10.0.2.2 in W7/IE, I go to the 127.0.0.1 in Ubuntu. But..
what should I do to go to another IP for example 127.0.0.2??
Regards
Javi
I don't get your question 100%, but localhost can be accessed by any* IP starting with 127.x.x.x.
*=except the net and broadcast addresses
UPDATE
After understanding your real problem, it has to do with configuring the network adapter between VirtualBox and your host. There are several networking modes available (NAT, Bridged, ...). Which one are you using? See http://www.virtualbox.org/manual/ch06.html for further information.
127.0.0.1 and 127.0.0.2 would resolve to the same machine. Do you have a web application with host headers to distinguish between those two connections?
精彩评论