perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Baker <>
Subject Re: [OT] Re: Vhosts + mod_perl
Date Mon, 03 Dec 2001 15:26:10 GMT
On Sun, Dec 02, 2001 at 04:19:28PM -0000, Jonathan M. Hollin wrote:
> :: Everytime I make a new document root for a different website, say the
> :: subdomain loco on, do I need to update the DNS?
> ::
> :: For and do I need to make new DNS
> :: entries for foo and bar subdomains? Surely I don't? Because browsers
> :: will ask for it, and get directed to, and my apache will
> :: take are of the rest from the HTTP 1.1 Host: field?
> If you are adding sub-domains then, of course, you need to update your DNS.
> Without a corresponding DNS entry, how could "" ever be
> resolved?

Actually, it's possible to create a wildcard domain so that
* will resolve identically.  

If you choose to do this you no longer have to update DNS for new hosts
but run the risk of people getting inappropriate errors when using a
hostname that shouldn't exist.  Instead of getting 'no such host' they'll
end up with a valid IP and will hit your web server which then has to
decide how to handle it.

As an example, your zone file can look just as follows - I've split www
and vhosts onto separate IP addresses but this isn't required, as you can
mix named and wildcard entries fairly freely.  If you use tools such as
dnslint you may need to append a comment on the end of your wildcard line
to indicate to dnslint that the wildcard is intentional.

(header fluff)

;; 'real' host
www   IN  A
vhost IN  A

ftp   CNAME

;; everything else.
*     CNAME

(footer fluff)



- Dave Baker  :  :  : -
GnuPG:  1024D/D7BCA55D / 09CD D148 57DE 711E 6708  B772 0DD4 51D5 D7BC A55D

View raw message