I am running Wamp on my computer (the host). I have set up several virtualhosts in apache and they are working fine when I access them from the same computer (host).

I have installed Windows XPMode on my computer (which is running windows 7). XPMode (which uses Virtual PC) is set up to use a NAT network. The network in XPMode is working fine, and I can access the host PC via the IP address 192.168.1.5, just as I would if I was using any physical computer on the same network.

I can view all the web pages at 192.168.1.5 and it's subdirectories. However, I cannot access any of the subdomains that are configured in the virtualhosts of the host computer.

How can I access the subdomains? I don't think that the fact that I am using XPMode and am using a virtualized OS has anything to do with it, but I thought that it was worth mentioning.

This question came from our site for professional and enthusiast programmers.

1

Doesn't belong on SO but in the meantime, what exactly do you mean by "subdomains"? From where are you trying to access them?
–
Pekka 웃Mar 21 '10 at 0:25

Apologies for asking this question in the wrong place! By subdomains I mean the subdomains (or at least, what looks like subdomains: app1.localhost) that I have setup using apache virtualhosts. I am trying to access them from within the virtual machine, though the same applies if I was to try and access them over the LAN.
–
PheterMar 21 '10 at 0:54

I have already added the nessesary lines to my hosts file in Windows 7 (the host OS) and subdomains work fine on the host OS. I have tried doing the same to the guest OS (Windows XP) but it did not help.
–
Peter HorneMar 21 '10 at 14:38

I just tried adding the rules again to the hosts file on the guest OS. It now works, not sure why it didn't before, and I cannot set localhost to point to 192.168.1.5 but at least everything else works. Thanks!
–
Peter HorneMar 21 '10 at 14:42

I know, but as I'm not using the virtual machine for anything other than running ie6 I figured it would be worth tying out. I guess I'll just change both host files to use .local or something similar instead.
–
Peter HorneMar 23 '10 at 16:32