Step 1: Retrieve Emulator’s Gateway IP Address
Grab the inet number resulting from
Step 2: Add Test Site’s Local Hostname to Window’s Host File
For each site I develop I setup a new Apache virtual host (some info on apache virtual hosts here). For instance, the local domain / hostname for a website could be
mabblog.localhost. When developing locally there are some hardlinks to the local development hostname, for this reason the it isn’t enough to use the inet vmnet1 address retrieved above when debugging in VMWare / Parallels; the local hostname must be added to the Windows host file.
Wikipedia has an extensive listing of the location of the host file on various systems, on Windows XP it is located here:[code]c:windowssystem32driversetchosts[/code] Open up the file in notepad and add your host entry, for example:
Step 3: Add Emulator’s Gateway IP Address to Your VirtualHost
In order for apache to properly handle the request coming from the emulator gateway you have to add the emulator gateway IP to the VirtualHost statement.