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 am trying to setup virtual subdomains using Bind9, following this tutorial.. http://groups.drupal.org/node/16862 which I've completed. Basically setting up the zone and modifying the resolv.conf file and the named.conf.local file.

I've gotten everything to work, and I am able to from my server ping mydomain.com , test.mydomain.com and when i do a dig I get the following..

; <<>> DiG 9.7.0-P1 <<>> test.mydomain.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 32606
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:
;test.mydomain.com.                IN      A

;; ANSWER SECTION:
test.mydomain.com. 86400   IN      A       174.###.###.#

;; AUTHORITY SECTION:
mydomain.com.      86400   IN      NS      mydomain.com.

;; ADDITIONAL SECTION:
mydomain.com.      86400   IN      A       174.###.###.#

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Wed Jan 19 21:06:01 2011
;; MSG SIZE  rcvd: 86

So it looks like everything is working. However, when I try and do test.mydomain.com in the browser, expecting it to default for now to mydomain.com it does not work and I get a server not found page in Firefox.

I did read elsewhere that in your virutalhosts file you also need to setup a *.mydomain.com alias, but that didn't fix anything.

Any other information that I could provide to help troubleshoot, or any troubleshooting suggestions?

I am using Ubuntu 10.4, with typical LAMP setup. The only other things installed on the server are Bind9 and ftp client.

share|improve this question
add comment

1 Answer

If it's showing the "server not found" page in Firefox it means that you're having a local DNS issue, try to add the domain to your local hosts fie and refresh your local dns cache.

share|improve this answer
    
When you say local hosts you mean - /etc/hosts ? Right now I have two lines: 127.0.0.1 localhost and 174.###.###.# mydomain.com webserver –  Steffan Jan 19 '11 at 23:23
    
That sounds good, but you need to add test.mydomain.com to that file as well, at least until the DNS changes get replicated properly –  lynxman Jan 20 '11 at 0:08
    
Hmm, I want it to handle any number of subdomains, that was the point of using bind9 so I wouldn't have to manually specify a large number of subdomains. Bind9 is suppose to forward all of the requests of any subdomain like test.mydomain.com -> mydomain.com which I can then manipulate as I would like (i.e. w/virtualhost and htaccess mod rewrite rules). –  Steffan Jan 20 '11 at 1:49
    
No you're missing what I'm trying to say, I'm saying that somehow either your cache or your DNS server (if different from the one you have configured) haven't received the change yet :) –  lynxman Jan 20 '11 at 8:25
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.