httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Behlendorf <>
Subject Re: NameVirtualHost
Date Mon, 27 Oct 1997 20:11:52 GMT
At 10:42 AM 10/27/97 -0800, Dean Gaudet wrote:
>On Sun, 26 Oct 1997, Brian Behlendorf wrote:
>> Dean, on hashing: I think you could expand the ip and port part so that
>> each possibility is hashed whenever it's left nonspecific.  I.e. let's say
>> there's 5 IP addresses and a tuple of ""; hash 5 different
>> tuples, each with the same config.  Likewise you could treat
>> "" by hashing for as many ports are listening. 
>I never said hashing was impossible, just difficult in this scheme.  Or at
>least that's what I meant to say.  By difficult I mean that there are far
>too many special cases that need to be dealt with, and so we'll probably
>mess it up.

Care to mention any?

>> Thus for every port and IP combination, you could get a list of valid
>> hostnames or regex matches.  Have two tables - a hash table with exact
>> hostnames, and a linear list of matching "*" file.  Search the
>> hash table, then search the linear list.  I have *no* problem telling folks
>> that if they want to optimize their vhost configurations, they should avoid
>> "*" and explicitly list all possibilities.  You could also go
>> crazy and ask DNS for all possible hosts at "" but I don't think
>> that's necessary :)
>It's not necessary to tell them to avoid *  See my proposal for
>a better solution.

I saw it; we could certainly do it that way too.  The essence of my
proposal was, hash on the IP and port # first, since those can be
enumerated completely, and then a combination of hashing and linear search
for hostnames.  

>regexs are evil in this setting. 

What, you don't want to be able to specify "ServerName
/www\..*wired\.com/"?  :)


"it's a big world, with lots of records to play." - sig

View raw message