I'm traveling at the moment, and have moved one of the websites I'm working on to my MBP so I can work on it without a network connection. I've made an addition to the Mac's /etc/hosts file pointing the domain name to 127.0.0.1, and all's well.
I now want to get into Parallels and check the site from Windows browsers. How do I get things so that the Windows browser will understand the domain name and access the site? The Windows image obviously doesn't recognize / can't find the Mac's /etc/hosts file, and references to 127.0.0.1 in the Windows hosts file just as obviously point to Windows, not the Mac. Any advice out there? Thanks!
What IP address you use depends on what networking mode you chose for Parallels, but running
ifconfig -a
in a Mac Terminal window should give you some options. I would normally choose the addresses associated with the interfacesvnic0
orvnic1
.Sorry no windows user here neither OSX, but...
Does the virtual machine and the OSX share any network?
If it works with any private network (192, 172, 10, etc...) to share the connection with the virtual machines, you can try that addressing instead of the loopback networks.
Obviously the OSX web server should listen too in that shared-interface or that address.
The other answer is the truly correct answer, but this is another way for those who don't know how to use terminal, and just want to try something quick.
As a general rule, if you haven't modified the settings of the VM you should be in a range like
10.211.55.[1-254]
.To get it the ugly way:
ipconfig
from a command prompt and get your IP (ethernet adapter, ipv4)'2'
. This will generally be the "parallels' network" address the host machine.10.211.55.3
, you can try10.211.55.
2.10.211.55.1
is your 'gateway', where all traffic not for your little network (you and host). This gets forwarded out to the world by parallels. So this is not the os-x host.I would add an entry in your windows hosts file, so you can change it without breaking any scripts.