httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: NameVirtualHost
Date Wed, 15 Oct 1997 22:51:07 GMT


On Wed, 15 Oct 1997, Rob Hartill wrote:

> Would "AllowNonIPVirtualHostsOnTheseIPs" be a reasonable synonym for
> "NameVirtualHost" ? that's not a suggestion for a change btw.

Yup.

> > Rob also asked about round robin servers.  Well, they're supported as
> > well.  For example, suppose foo.imdb.com is an A-based RR (i.e. returns
> > multiple A records, a CNAME-based RR is slightly different),
> 
> mine are CNAME based.

Then you have the option of using multiple config files one for each
cname, or specifying all the cnames in a single config file and reusing
that same config file.  (I know I know, you use perl to generate it ...) 

> Not Deans fault/problem, but mod_perl lets people stuff a pile of
> VirtualHost definitions into a hash. When the hash is accessed by the
> config parsing part of mod_perl the order in which things come out of
> the hash are unpredictable. This was why I was asking about file-less
> config parsing earlier this week/month. Perl's good at building strings.
> 
> Doug, since the first VirtualHost section has significance, we either
> need a workaround (perhaps a separate <Perl> </Perl> block to define
> the first VirtualHost will work) or change of approach.

Note that the ordering has always been important -- the last name-vhost
used to be the "overriding" one.  Now it's the first... which matches how
other directives (such as <Directory>) work.  (aside: uh, does mod_perl do
the same hash thing with <Directory>s?  'cause that'd be broken too.) 

> With my mod_perl setup, "NameVirtualHost *" on its own didn't work
> and multiple "<VirtualHost *>"s are not (AFAIK) possible from within
> a <Perl>..</Perl>. Any way around this Doug ?

Ah.  Right.  Yeah the perl interface is kind of broken then, because not
only can you specify multiple "<VirtualHost *>"s, but you could specify
multiple "<VirtualHost 10.0.0.1>"s as I gave in my example. 

The addresses/names in the <VirtualHost> line are those which cause that
config to be IP-matched.  Other directives might cause it to be
name-matched ... but the IP-matching is based entirely on what's in the
<VirtualHost> directive.  So with name-vhosts that line isn't unique.

Even ServerName isn't unique, it's not incorrect to define the same server
multiple times on different addresses. 

Nothing is unique ... I think you'll have to switch to a vector of hashes
or something. 

Dean



Mime
View raw message