[Running Mac Development Domains from Windows Browsers]

Figure 1.

Virtual PC network settings

Figure 2.

Windows XP Network Settings control panel

Figure 3.

WinXP LAN Properties

Figure 4.

WinXP TCP Properties

Greg Willits, April 02, 2006

Once you have created multiple test domains on your Mac, you will want to test them using your Windows browsers as well. This can be done using a separate Windows system on the same sub-net as your development Mac, or by using Virtual PC on your development Mac.

These instructions assume you have a DHCP server on your network, but you can modify this to use real IP addresses if you have them. If you have a single point internet connection to just your one computer, then honestly I'm not sure what would have to be changed. (If you know, then pass on the info, and I'll update this article). However, you can get a home router which will have a DHCP server in it fairly inexpensively, and then you'll be ready for more computers as a bonus :-)

Configuring Virtual PC

First, make sure Virtual PC's network settings are set up like that shown in Figure 1.

Next, open a VPC Machine and make sure the IP networking settings are configured to use DHCP. You'll find this starting in Control Panels > NetWork Connections > LAN or High Speed Internet (figure 2).

In the Local Area Connections Properties window, double-click the Internet Protocol (TCP/IP) entry (figure 3). In the subsequent window (figure 4), verify that "Obtain an IP address automatically" is selected.

Adding Test Domain Names to Windows

OK, so now we have to inform Windows how to find the test domains you've created on your Mac.

Open My Computer in Windows:

For Windows XP, navigate to C:\WINDOWS\systens32\drivers\etc\

For Windows NT or 2000, navigate toC:\WINNT\systens32\drivers\etc\

Open the file named 'hosts' using NotePad. Make a shortcut for the hosts file and put it on the dektop or in MyDocuments--you'll want this file handy for edits.

Let's assume your Mac's IP address is 192.168.0.10. Add lines to that file which look like this:

192.168.0.10	
www.mysite.dev 
192.168.0.10 padawan.pageblocks.dev
192.168.0.10 apprentice.pageblocks.dev

So, of course, use the IP address that your Mac actually uses. If you're using DHCP, then configure your DHCP server to always give your Mac the same address.

Having done all that, you should now be able to type in those .dev domains into your Windows browsers which will hit Apache on your Mac and testing life will be good.

I use a desktop G5 so that I can have gobs of RAM. I have 4GB so that I can have all my development and documentation apps open, several Mac browsers, and multiple VPC machines running at the same time. It makes testing very productive.

For VPC machines, I run W2K with IE 5.0, W2K with IE6 and Firefox 1.0, WinXP with IE6 and Firefox 1.5. Of course, you can add others as well, but the main thing is to have the multiple OS/IE combinations. I've seen article about having more than one IE on a system, but I haven't tried those techniques.

Email:


Password:



Articles