Subdomains revisited

After replacing the HD in my XP server I decided to give Apache 2.0 a try. So what am I doing wrong here. All my subdomains resolve to the main webpage of my domain, and not their own. I can configure Apache to serve just my domain, and I can configure it to serve my domain as a Vhost, but none of the subdomains end up at the proper page. They all end up back at my domain. I have a static IP address, and the server is behind a router. But that wasn't an Issue before (with apache 1.*). Here is a sample of what I have setup. Where did this go wrong?

NameVirtualHost *:80

<VirtualHost *:80>
ServerAdmin webmaster@mydomain.com
DocumentRoot C:\webpages\mydomain
ServerName mydomain.com
ErrorLog logs/mydomain.com-error_log
CustomLog logs/mydomain.com-access_log
</VirtualHost>

<VirtualHost *:80>
ServerAdmin host1@mydomain.com
DocumentRoot C:\webpages\hosts\host1
ServerName host1.mydomain.com
ErrorLog logs/host1.mydomain.com-error_log
CustomLog logs/host1.mydomain.com-access_log
</VirtualHost>

If any of you can straighten out my mess I would appreciate it.

 

 

 

 

Top