I have an apache with following settings.

I have 3 other computers in my network. 2 desktops and a laptop.

On every computer, on the browser I want to type some thing like,

example.com/site --> resolve to
example.com/site --> resolve to


sample.com/blog --> resolve to

I want 2 names......example.com and sample.com and I just want it to resolve these addresses for every computer on the network. I dont want it to cache public domain names for local use nor have outside internet access these sites. The above apache is running on a ubuntu 9.04 VM, and I assigned the IPS.

I am following this guide there. http://ubuntuforums.org/showthread.php?t=236093

I am having issues with zone definition and reverse zone definition files. I dont really understand the options. Can some one tell me which options to change to suit my particular case....

// replace example.com with your domain name. do not forget the . after the domain name!
// Also, replace ns1 with the name of your DNS server
example.com.      IN      SOA     ns1.example.com. admin.example.com. (
// Do not modify the following lines!

// Replace the following line as necessary:
// ns1 = DNS Server name
// mta = mail server name
// example.com = domain name
example.com.      IN      NS              ns1.example.com.
example.com.      IN      MX     10       mta.example.com.

// Replace the IP address with the right IP addresses.
www              IN      A
mta              IN      A
ns1              IN      A

and the reverse zone definition file,

//replace example.com with yoour domain name, ns1 with your DNS server name.
// The number before IN PTR example.com is the machine address of the DNS server. in my     case, it's 1, as my IP address is
@ IN SOA ns1.example.com. admin.example.com. (

                     IN    NS     ns1.example.com.
1                    IN    PTR    example.com

I am just confused and I'd rather have a clearer understanding of what I am doing than trying a bunch of things. Any help would be great.... Also, please let me know if I am not doing some thing right. Thanks for your time.

  • +1 for a polite, well-formed and well-illustrated question. – msanford Dec 17 '10 at 2:07
  • This might be a stupid question, but have you configured your LAN machines to ask for DNS resolution from that bind server you set up? – msanford Dec 17 '10 at 2:11
  • 1
    If this is only for a few hosts on your local network you might be much better off with something more light-weight like Dnsmasq instead of messing with bind. – Zoredache Dec 17 '10 at 2:16

In your scenario, which sounds like a LAN development case, I would take the easy road and just edit the /etc/hosts file on your three local machines to resolve to your LAN development server, rather than going through the rigmarole of configuring bind on your LAN.

# Host Database
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##       localhost broadcasthost
::1             localhost   sample.com   example.com

You'll still get example.com/site1 and /site2 because they're handled by Apache.

The only caveat is that you will have to have the user add the port to the request because you can't specify destination ports in /etc/hosts, or you could use a couple of the simple options available to you through iptables and vhosts.conf.

I'm also assuming this would be an acceptable solution because you said "I just want it to resolve these addresses for [three| computer[s] on the network" and not I want to learn how to configure bind properly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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