This post describes how to view local sites using MAMP and Parallels with minimal configuration. I am using MAMP 1.7, Parallels 4.0 and Windows XP, and OS X 10.5.6. This is definitely not the only method, but it works for me, and it’s easy to set up. I realize MAMP is not completely necessary on OS X, but the one-click installation is nice and suits my purposes for now.
In my attempts to get this working correctly, I first downloaded and installed Bonjour in the Windows virtual machine. I’m not sure if this is essential or not, but this was the first thing I did.
After unsuccessfully trying other options, I ended up enabling Web Sharing in OS X: System Preferences > Sharing > Web Sharing. After this is enabled, you’ll see an IP address listed under “Your computer’s website.” Using that IP address in Windows, you should be able to successfully access the MAMP site. The MAMP site address by default starts with localhost:8888. In Windows, substitute “localhost” with your IP address listed in Web Sharing.
To get the images and CSS to display correctly, I had to change one more setting. In my case, I’m using ExpressionEngine, but this would also apply to other CMS software as well. In ExpressionEngine, go to Admin > System Preferences > General Configuration and change localhost to your new IP address where appropriate. I think it’s only necessary to change the “URL to the root directory,” but I changed all the URLs. To get any images that you uploaded to display properly, go to Admin > System Administration > Weblog Administration > File Upload Preferences. Select Edit, and adjust the URL of the upload folder to use the IP address.
That’s it! You should be able to now view any sites in OS X via Parallels.