Bind + Name Based virtual hosting for apache

Kevin Darcy kcd at
Mon Jun 3 22:38:16 UTC 2002

HYK_TremorZ at wrote:

> Ok lemme give you my setup first.  The domain i have authority over is
> and the IP it points to is
> Along with the DNS server, we also have an apache web server on the
> machine.  Now we only have 1 IP address, so when we do subdomains for
> webpages, we have to use name based virtual hosting (i.e.
>, jason,,, etc.).  Each of the
> subdomains exists on the same server.
> What would be the best way to go about adding the information to the
> db.lctc zone file?
> Currently, we're using cnames to do it:
> ivan            IN CNAME
> jmarthak        IN CNAME
> john            IN CNAME
> khen            IN CNAME
> kourtney        IN CNAME
> We haven't tested this out yet because we want to make sure we got it
> as right as possible before we do.  Any insite will be appreciated,
> thanks.

That's fine, as long as you're only dealing with subdomains of
If and when you want to start pointing registered domain names at your
web server, e.g. host an website, or, for that matter, any
name that is the same as the name of a DNS zone, then you'll run into the
restrictions of the infamous "CNAME and other" rule, and you'll have to
use A records instead of CNAMEs...

- Kevin

More information about the bind-users mailing list