perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Baker <d...@dsb3.com>
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 trains.ath.cx, do I need to update the DNS?
> ::
> :: For foo.trains.ath.cx and bar.trains.ath.cx 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 trains.ath.cx, 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 "foo.trains.ath.cx" ever be
> resolved?
>

Actually, it's possible to create a wildcard domain so that
*.trains.ath.cx 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   123.123.123.1
vhost IN  A   123.123.123.2

ftp   CNAME   www.trains.ath.cx.

;; everything else.
*     CNAME   vhost.trains.ath.cx.

(footer fluff)


Dave

-- 

- Dave Baker  :  dave@dsb3.com  :  dave@devbrain.com  :  http://dsb3.com/ -
GnuPG:  1024D/D7BCA55D / 09CD D148 57DE 711E 6708  B772 0DD4 51D5 D7BC A55D


Mime
View raw message