Hi everyone i recently had my hosts make a dns change and add a subdomain to their dns and now my subdomains all point to the main website, I think it may be a problem ive caused with my virtual hosts. I have several ips the subdomains that are ip based are fine they resolve as expected.
here is my main sites virtual host file
Code:
<VirtualHost 64.xx.xxx.xx:80>
ServerAdmin webmaster@example.com
ServerName www.exampledomain.com
ServerAlias exampledomain.com
# Indexes + Directory Root.
DirectoryIndex index.html index.php
DocumentRoot /var/www/exampledomain.com/htdocs/
</VirtualHost>
and here is the subdomain in questions file
Code:
<VirtualHost *>
ServerAdmin webmaster@example.com
ServerName subdomain.exampledomain.com
ServerAlias subdomain.exampledomain.com
# Indexes + Directory Root.
DirectoryIndex index.html index.php
DocumentRoot /var/www/exampledomain.com/subdomains/subdomain/htdocs/
</VirtualHost>
Im assuming it has to do with the subdomain using the wildcard "<VirtualHost *>" but if so, i have no idea what to do I have tried several things like <VirtualHost subdomain.exampledomain.com> and <VirtualHost 64.xx.xxx.xx:80>.
I have even put the subdomain into the main sites virtual host file, and being debian i a2ensite'ed it restarted the server, reloaded it etc.
My hosts say they have wildcarded all subdomains in their dns, but knowing very little about dns Im not sure what effect that would have?
Any clues as to how i can get my subdomains pointing to the right directories again without ip basing them all?