-   Linux - Server (
-   -   BIND with Apache Virtual Hosts (

maxsanders 06-01-2007 05:44 AM

BIND with Apache Virtual Hosts
My Apache server is configured for three virtual hosts (three web sites with domain names registered to me),, and

I use the nameservers at Godaddy, my domain registrar, and point all three domain names to the single static IP used by my server.

Localhost on the server brings up the first listed virtual host. ( brings up giardiafaq on the server box, and on the private network, but the other sites will not be served to the private network or the internet. Only the first listed virtual host appears.

Internet shows only the first listed virtual host whether I use its name in the address or the IP of the server.

Conclusion: I need BIND or its equivalent to resolve these names.

Question: Can I use the Godaddy nameserver as a secondary/slave?
Can I use Bind on the server box and give its IP as the same as the server? I assume that my BIND needs to include the root servers in a root zone , and treat my three virtual hosts in a master zone?

I have only one static IP. Can I use one Godaddy nameserver to have the required two nameservers? Do I include the Godaddy nameserver in my Bind config?

Sorry for the long post. Thanks.

flupke 06-01-2007 06:12 AM

Before playing with nameservers, I would advise you to make your tests by mapping name to IPs in your /etc/hosts file.
ie, you insert a line
in /etc/hosts

This will ensure you to have the correct name resolution. When you are sure the your apache virtual hosts are setup correctly, then you delete this line and use internet name servers to resolve names.

On the other hand, from what I can see from dig and www requests :
* drnozit does not resolve correctly (err, well, it does not resolve at all...) but the 2 other sites seem OK, provided is indeed your IP of course... :)
* In a web page, when you want to make a link to another site, you have to use a full URL (not "", but "") or it will be considered as a link relative to the current page.

I don't think you have to install a bind server. I think your problem comes from your virtual host configuration.


digitalnerds 06-01-2007 09:07 AM

Im pretty much positive the problem is strictly related to your Apache virtual host configuration. Leaving the nameserver on GoDaddy's care would be the best thing if you dont want to run a DNS server. Please check your vhosts config. If you cant manage to fix your issue mail me on I'll gladly assist you with your problem.


All times are GMT -5. The time now is 01:47 AM.