Serving Localhost from Mac OSX to Parallels
On occasion during development, I like to check how my .css and javascript functionality works in IE. Right now, IE only has about 25% of the total internet market for browsers (w3schools.com) for 2011; and it is slowly deteriorating. But I don’t want to disparage users for using inferior products, so I like to test against them. Besides, 25% of market share is not ALL bad.
I did some digging on Google and found a few helps, but nothing as specific as I wanted. So here I present how to get Parallels to server up MAMP pages from my OSX MacBook Pro.
First, you need to setup Parallels to host-only networking by going to preferences:
- preferences->network->Connection type: Host-only networking
- also, check the Show in System Preferences checkbox
Next, go to your Mac System Preferences under the Interent & Wireless section click on:
- sharing->internet sharing->share your connection from: Parallels Host-Only…
- check the Ethernet box
- check the Internet Sharing Box again, and click yes
Now you are setup. However, if you are doing virtual local hosting and setting up multiple hosts, you will need a way to call them from windows. The way to do that is by inserting the host information into your hosts file on windows, the same way you do for the mac.
For this example, if you have a localhost called mysite.local you want to access in IE on Parallels, after following all of the setup above, you need to do the following:
- point IE in Parallels to localhost (it will reveal the IP address of the localhost)
- add a record to c:\windows\system32\drivers\etc\hosts for the localhost virtual host setting
- example: 192.168.0.10 mysite.local
Now you should be able to access the localhost virtual host in IE on Parallels.
Happy coding!









>
Follow Me (digitally you stalker)