Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I configured my DNS (bind9) to accept every subdomain, using a wildcarded 'A' record :

*.mydomain.tld.      IN    A         xx.xx.xx.xx

I configured Apache to serve some specific subdomains using virtual hosts :

<VirtualHost *:80>
        ServerName sub1.mydomain.tld
        ServerAlias sub1.mydomain.tld
        JkMount / sub1JK
        JkMount /* sub1JK
</VirtualHost>

when I ping from a remote computer on a subdomain configured in apache I get a response. When I ping on a subdomain that is not configured in apache, the host is not found.

I don't understand why apache configuration would affect DNS resolution like this?

I would appreciate any information that helps me understand this.

Thanks a lot.

share|improve this question
1  
What happens when you attempt to resolve the different names with nslookup or dig? Can you provide command output? Your assumption is right - Apache has nothing to do with the name resolution; something else is going on. –  Shane Madden Feb 22 '12 at 17:37
    
I'm going off a wild hunch here... is your BIND instance authoritative for the zone, or is something else the authoritative DNS servers listed? –  Joe Sniderman Apr 1 '12 at 18:53
add comment

1 Answer

You can confidently exclude any relation between Apache and BIND, and any relation between ping and either of the two. The problem you describe is rooted somewhere else.

Here's how you can troubleshoot it:

  1. Query from a remote host your DNS server for the two domains not working: dig @dns-srv-ip sub1.domain.com and dig @dns-srv-ip sub2.domain.com
  2. If your BIND Wildcard configuration is running, they will both return the IP. If not, the problem is in BIND: make sure BIND reads the files you edited.
  3. (remote) ping uses the DNS resolver configured on the remote host. Check /etc/resolv.conf on the remote host, and use dig sub1.domain.com and dig sub2.domain.com to ensure both are resolved. No @dnsip here!
  4. if sub1 and sub2 do not resolve identically at the remote host, then it's a propagation issue, or a resolver issue.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.