I have a fresh install of Apache on a Windows Server 2003 box. The root site (e.g. www.mycompany.com) works. I have a subdomain set up that points to a different directory (subdomain.mycompany.com) and I get a "Cannot find server" error when I try to access it.
Here's my httpd.conf file:
<VirtualHost>
DocumentRoot H:\Websites\"
ServerName www.mycompany.com
ServerAlias mycompany.com
CustomLog logs/mycompany.com.log combined
ErrorLog logs/mycompany.com.error.log
</VirtualHost>
<VirtualHost>
DocumentRoot "H:\Websites\subdomain"
ServerName subdomain.mycompany.com
CustomLog logs/subdomain.mycompany.com.log combined
ErrorLog logs/subdomain.mycompany.com.error.log
</VirtualHost>
Like I said the root site works, but the subdomain isn't even being found. This is how things are supposed to be set up, no? I'm really confused on this – I'm used to IIS where I can just right-click and add a site and have everything "Just Work".
Best Answer
did you put a subdomain record in your dns server?