httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Dean Gaudet)
Subject <VirtualHost> syntax questions
Date Sun, 30 Jun 1996 08:11:51 GMT
I'm in the process of merging our code to 1.1bwhatever.  I'm looking for
input for syntax for some of the changes.  I didn't pay enough attention
when all the 1.1 <VirtualHost> and Host:-header stuff was going around
on this list.

First of all, my additions to 1.0 syntax:

    (1) <VirtualHost ...> ... </VirtualHost>
	defines a virtual host that responds to any of the listed addresses

    (2) <VirtualHost> ... </VirtualHost>
	defines a virtual host that responds to any of the addresses resulting
	from a lookup of ""

    (3) <VirtualHost> ... </VirtualHost>
	defines the "default" virtual host -- the host that answers when
	no others match.

(Mix the above as desired.)

Some motivation.  The need to deal with multihomed machines is an obvious
reason that (2), and to a similar extent (1) is nice.  I use (1) to make
all my webserver config files identical.  (All machines
run the same config file.)  This has obvious maintenance benefits... and
can really help when one of the servers fail.  All of the "web serving"
addresses on my servers are aliases on the loopback interface.  If one
of the servers goes down, some routing magic directs the hits to a
live server... it requires each server to be able to serve any of the
addresses listed in the DNS.

(3) comes about partially because I'm paranoid, and partially because
of how I do that hit "stealing" for down machines.  The paranoid part
is easy to explain:  I don't want someone to be able to find an address
on my machines which I don't list in my config file and through that
get at stuff I don't want them to see.  Essentially I wanted to issue
a redirect for all these "unlisted" addresses to
Is there another way to do this already in 1.0 or 1.1 syntax?

Sooo... now that 1.1 syntax is around and Host:-header parsing is in,
it looks like I need to rethink at least (2) above.  But I'm open
to suggestions for redoing the entire syntax, as long as I get the
functionality I need.  I can hack around it with m4 macros, but I'd
really rather keep the number of server_recs down.

I'll make the patch available as time permits.  (I actually sent a patch
for this against 1.0, but it got lost in the shuffle as I was too busy.)


P.S.  It's obvious that to support hundreds to thousands of busy virtual
hosts we need to use hashing... but non-ip virtualhosts with ServerAliases
pose some interesting hashing challenges.  You'd pretty much have to
hash-and-cache on the fly or something.

View raw message