We use modified hosts and httpd.conf files to develop locally: we can use nice urls like http://project.dev. Here is the abbreviated tale, in stack format, of trying to get IE in Parallels to load pages served from the self-same MacBook running OS X and apache. I will be parachuting in with only a flint, a knife, and NO ADMIN PRIVILEGES on the Windows side. Let’s get going.
- set up Parallels to test web pages on Win IE
- change /WINDOWS/system32/drivers/etc/hosts to talk to the Mac side
- don’t have admin privileges on Windows side
- attempt to write file from Mac side
- can’t write to file: Tiger’s built-in NTFS driver is read-only
- MacFUSE + a FUSE NTFS driver can do it
- install MacFUSE
- install Fink, configure
- attempt to install ntfs-3g
- Fink complains about missing files
- fiddle with Fink for a while, get it the files it’s missing
- Fink complains, “Can’t resolve dependency “gcc4.0 (>= 4.0.1-5363)” for package “fuse-0.4.0-3″ (no matching packages/versions found)”
- download update to Mac Developer Tools …
Around now I think, wait … wasn’t all this just to write to one bloody file? Anyway, this part takes a while. I eat a live scorpion to maintain my energy.
- install dev. tools
- Fink agrees to install ntfs-3g (yay!)
- follow rest of instructions on mounting the ntfs drive
- edit hosts file (it works!)
- attempt to hit the Mac’s apache from IE on Windows in Parallels …. FAIL.
- iterate over combinations of hosts files, local IP addresses, loopback addresses, Parallels network configurations … each time:
- shut down windows
- wait for the Parallels VM to stop
- mount the ntfs volume (eventually wrote a script* for this)
- drill down to the hosts file
- edit the file
- unmount the ntfs volume
- boot windows
- (click through 20 superfluous notifications)
- try combinations of network settings
- NOTHING
I iterated on that about 20 times. Folks on the web who have done this have done it by hard-coding their machine’s IP address. I was being stubborn and wanted to avoid that if possible. It wasn’t. Eventually this did work, but yes, I had to hard-code my laptop’s IP address into windows’ hosts file, and ALSO add an entry for the IP in my mac’s httpd.conf file to make the nice URLs work.
This is a far from ideal solution in a world of cafés and DHCP. I hope, if you ever find yourself in this situation, you too can find your way back to civilization.
* fuse_ntfs() {
mkdir /Volumes/ntfs_volume; ntfs-3g /dev/disk0s3 /Volumes/ntfs_volume;
}
Your device name may differ.