« Web App Development Part 4

HTML5 and video »

November 5th, 2008 Written by Nate Steiner

Testing IE locally on Mac with MAMP Pro and Parallels

Something I used to do, when browser differences were almost ridiculously difficult to manage, is use the worst browser as my primary browser. Winner of the “Worst Browser” award changed hands often, but these days it’s championed by the corporately entrenched yet sorely outdated IE 6. The fastest way (for me) to test IE CSS layout and rendering issues, is every-step-of-the-way, locally, and as I build. As a Mac-based developer, my development time is greatly sped up if I can review work locally via Parallels (or some other Windows emulation). The problem: Parallels is a guest operating system, intended to have it’s own identity on your network. Locally served sites are not automatically accessible via Parallels right out of the box.

The good news is that it’s not hard to make your locally served websites accessible, it’s just a matter of choosing the method that suits your needs. Unfortunately there’s a lot of information on this topic out there that doesn’t quite give a complete solution, and I think some of the solutions out there are based on an older version of parallels.

So, without further ado, here’s how I’ve setup Parallels 3.0 for Mac with a guest OS of Windows 2000 and a series of websites served locally on the mac via MAMP Pro.

  • Change the default parallels networking setup in System Prefs – There are 2 of them, you want to change the one that includes “(en3)”. Change it from DHCP, to DHCP with manual address Enter in an address like: 192.168.2.102
  • Add an alias for the domain you are working on (bottom part of MAMP window), use the IP you entered above, save changes to mamp.
  • Be sure to be on shared networking in parallels
  • In parallels, open the ip, plus the port in your browser, it works!
  • Use a unique port for each site, and add an alias for each site in MAMP

Please don’t hesitate to leave a comment on this post about your own experiences, this is by no means exhaustive and does not account for firewall settings, and probably many other factors. I am by no means qualified to do more than just report what works for me, and would welcome expertise on the subject here.


Update

Parallels 4.0 is out now, I managed to get the setup above working there too, however there are some modifications.

  • You may need to set your parallels network adapters (in system prefs, network) to “manually” configure. Instead of being labeled “(en3)” they are now labeled the more logical “host only” and “shared.” The one you want to work with is “shared”. I set my IP to “10.211.55.2″ and my subnet mask to “255.255.255.0″, the rest I kept blank.
  • The default for network settings in Parallels itself has to be set back to “shared” and “shared networking” in the little web icon at the bottom of your virtual machine window (or in the virtual machine config window)

Posted in CSS, Process |

You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.


18 Responses to “Testing IE locally on Mac with MAMP Pro and Parallels”

  1. elpres Says:
    November 5th, 2008 at 11:57 am

    Wouldn’t it be easier to install IE using Wine or ies4osx?

  2. Nate Steiner Says:
    November 5th, 2008 at 12:02 pm

    If I remember correctly ies4osx and IE over Wine does not support transparent PNGs properly (which are critical to test in IE if you use them with filters or hacks). I also found them to be glitchy and slower than real IE inside a real Windows install. But if you don’t use transparent PNGs, it might preferable – and certainly cheaper.

  3. suzanne Says:
    November 5th, 2008 at 12:55 pm

    worked for me :D

    thanks!

  4. Steve Stedman Says:
    November 6th, 2008 at 3:02 pm

    Hey Nate, I’m not sure it works the same way in Parallels, but with VMWare and some fancy Mac/MAMP tricks you can test multiple local sites: http://plebeosaur.us/web-development/pointing-to-mamp-from-virtual-windows/

  5. Michael Says:
    November 28th, 2008 at 12:17 pm

    Does this method work with parallels 4.0? Can’t get it to work despite having the firewall wide open etc. etc

  6. Nate Steiner Says:
    November 30th, 2008 at 9:25 pm

    I did get it to work in Parallels 4.0, I’ll review my settings and post an update.

  7. Brian Artka Says:
    December 1st, 2008 at 3:38 pm

    so, either I feel really stupid, or is there a way to test a MAMP installed site on another windows machine (say, a windows XP laptop laying around)? I cant figure it out for the life of me…

  8. Nate Steiner Says:
    December 1st, 2008 at 10:53 pm

    Don’t feel stupid Brian, this stuff can get confusing fast. I think you can test on another machine as long as they are both on the same network. You can address your MAMP site via the IP of the Mac running MAMP, plus the port number (it should show the IP in system prefs, sharing, web sharing). There’s probably other ways to do it too.

  9. Nate Steiner Says:
    December 1st, 2008 at 11:04 pm

    Ok! update for Parallels 4.0 has been tacked on to the end of this post.

  10. Beto Says:
    December 3rd, 2008 at 7:20 am

    I’ve follow your indications and It doesn’t work for me, I suppose I did something wrong.
    My Parallels is Versión 3. I configured its Network Adapther as Shared Networking. I created a new network connection in Mac with an Ip address witch I added as an alias in MAMP Pro.
    When I browse the ip address + port in Parallels it doesn’t find the web page.
    I tryed to configure the Parallels Network Adapther with the Ip address I gave in Mac and even with DHCP but still doesn’t work.

    Any idea?
    Thanks

  11. Otto Says:
    February 26th, 2009 at 1:41 am

    Didn’t work for me either.
    IE in XP could not even find the Virtual server.

  12. Otto Says:
    February 26th, 2009 at 2:08 am

    I had not rest things properly – SORRY for the above post.
    It does work.

    It would be nicer to be able to use the local name resolution like you can on the mac side.
    I had that setup working by adding the virtual hosts to the Win XP hosts file and using the Mac IP address i.e http://10.1.1.4:8888/mysite/index.php
    This way it was easier to tell dev sites appart rather than by a list of ports.
    The above methid sort of works but now does not aliasing directories in Parallels unless all paths have “/” removed.

  13. Adam Says:
    March 12th, 2009 at 8:34 pm

    Nice one Nate, after trawling the net all evening and coming across some ugly hacks for this setup I found this here excellent tut thank God!

    Worked like a charm!
    Cheers!

  14. steph Says:
    May 21st, 2009 at 6:11 pm

    Nate,

    Wonderful! The shortest and clearer way to make it work! (windows xp + parallels 4). Took me 10 minutes, so that was perfect.

  15. Randy Says:
    July 6th, 2009 at 4:05 pm

    Thanks a bunch, been trying to think about getting this to work for sometime but without Parallels. This helped me display an intranet website within my business.

  16. Federico Holgado Says:
    July 19th, 2009 at 9:19 pm

    It sounds like you guys are really going crazy over this! Here is my solution…

    Every Mac can be accessed on your network by it’s computer name. Mine is fholgado.local. This can be checked and changed if needed under your Sharing Preference Pane in System Preferences.

    I set up Parallels Network adapter to be on “Bridged” mode, which states that it will make the Virtual Machine appear as it’s own IP on your network.

    All that is left to do is just access your site from the Windows machine, just the same way you could access it from your Mac.

    For example, using XAMPP I can access my sites like this from my Mac or anywhere else on the network:

    http://fholgado.local/sites/fholgado/index.php

    The nice thing about this is that you don’t have to worry about your IP changing through DHCP.

    More advanced settings such as multiple sites can be configured with ports like the article mentions.

    Does this make sense?

  17. Webdesigner Says:
    September 18th, 2009 at 5:21 am

    Nice article, Nate. By the way, if you think IE6 is the worst browser, you should have a go at IE5 for Mac ;-)

  18. catcoder Says:
    February 10th, 2010 at 5:03 am

    Good idea, Nate. I’ve been looking for this decision for an aprox a year. Finally I found it in your page. Thank you a lot.

Leave a Reply