httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Pool <...@wistful.humbug.org.au>
Subject Re: hashing virtual host names
Date Thu, 31 Dec 1998 09:04:47 GMT
On Wed, Dec 30, 1998 at 07:18:54PM -0800, Dean Gaudet wrote:
> Yep.  You need multiple hash tables, they'd replace the name_chains in
> http_vhost.c.

I'd already registered that, but hadn't thought about wildcards.
Thank you for the notes, Dean.

> Since you've got some time at config-time to build a nice data structure
> you can probably use something fancy to handle the last case.  Try taking
> the domain names in reverse and sticking them into a search tree... I
> bet with a little thought you can solve the second problem.

I'll give it some thought.  As you say, if there's no sufficiently
general and simple way to do it with hashing it can always fall back
to linear search.

> Finally -- I'm not sure how critical this is, because we do provide
> the tools (via UseCanonicalName and mod_rewrite) to host zillions of
> vhosts without a single addition to the config files.  I think there's
> been some posts describing how to do this... (and someone was going to
> write a special module so you didn't have to use the full
> mod_rewrite).

The only reason we [=server101.com] are using virtual hosts right now
is that we want to run scripts within each using the suEXEC User
directive, and that requires a VirtualHost scope.  Perhaps we'd be
better off with rewrite rules and using something based on cgiwrap.

On the other hand, I imagine many people _will_ configure Apache with
lots of virtual hosts because that's the obvious way to do it.  (I'm
imagining a ${middle-brow computer magazine} reporter setting up
Apache and IIS with 100 vhosts without really reading the manual.)  It
seems like it'd be nice if it performed well when used in the obvious
way.

-- 
Martin Pool

Mime
View raw message