I'm having a strange problem. I'll be quick about the setup:
Following are A-records pointing to the same IP:
I have tried using CNAME for the sub-domains, but that did not change anything.
Apache 2 setup
I have two virtual-hosts:
<VirtualHost *:80> ServerName domain.com ServerAlias www.domain.com DocumentRoot /var/www/a [...log setup] </VirtualHost>
<VirtualHost *:80> ServerName dev.domain.com DocumentRoot /var/www/b [...log setup] </VirtualHost>
Take notice that there is no host set up for login.domain.com.
Now to the problem. When I enter dev.domain.com it says server not found instantly. Have tried clearing cache and all that, and on several computers. www.domain.com and domain.com serve from the right directory. login.domain.com redirects to domain.com for some reason.
The config above is the only one under sites-enabled, but it also loads a config from phpmyadmin.
I guess what I'm asking is, how do I begin diagnosing the problem? How can I rule a DNS problem out? I have tried adding dev.domain.com as a serveralias to the current config - nothing changes. And I have no idea why login.domain.com redirects - there's not wildcard anywhere as far as I can see.
Where do I start?