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.

So, following this question here and a number of other questions about subdomains on localhost, we learned that /etc/hosts isn't capable of handling wildcard routes and we need a DNS system. Ok, I have installed Bind9 on my machine (Ubuntu). Now, could someone finally explain how to set it up to route *.domain.local to 127.0.0.1

share|improve this question

1 Answer 1

up vote 2 down vote accepted

You need to add the following A record to your "local" zone:

*.domain.local. IN A 127.0.0.1

Don't forget to configure your machine to use that DNS server (in /etc/resolv.conf).

share|improve this answer
    
And if it's the only zone you're hosting don't forget to set at least one forwarder. –  John Gardeniers Oct 8 '10 at 1:15
    
Thank you guys, that worked out for me. However I also had to add a zone "domain.local" to /etc/bind/named.conf (same as "localhost"). –  Dziamid Oct 8 '10 at 19:35

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.