Yeah, I said it. As we all know, there's a million and one schmucks out there still rockin' Internet Explorer as their default browser. That means if you want that spreadsheet-in-the-cloud app you've been working on to hit critical mass, you better test it in IE.
If you're like me, then you've recently started running some or all of your apps locally via Passenger. This can cause a bit of a problem when it comes time to test in IE. At least, it did for me anyway.
I use Parallels for my Windows testing, and an old version at that. From what I hear, VMWare is better, but I'm too cheap to buy it and I just don't really care that much. Prior to using Passenger locally, I would just point IE at my mac's IP address, port 3000, and everything was kosher. Well, with Passenger, that no worky.
Now, I'm sure there's probably a way to configure Parallels to allow me to test a Passenger app, but from what I can tell that either requires an updated version of Parallels or more time Googling than I'm willing to spend.
I knew that I could access my local Apach instance from any machine on my home network, so I figured there's got to be a way to hit my Passenger apps since they're running under that same Apach instance. With a little help from a fellow Intridean, I got it working.
Here's what you do:
1. Set your app up in Passenger, like you normally would. I use the pref pane.
2. Determine you mac's IP address. An easy way is to look in the sharing section of the System Preferences.
3. On your Windows machine, add an entry to the hosts file with your mac's IP address and the app's domain (local) domain name. The host file is in C:\WINDOWS\system32\drivers\etc.
That's it! Point IE at http://yourapp.local and you should be golden. This will work for subdomains also, assuming you've added the *.yourapp.local alias to you Passenger conf.