httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <>
Subject Re: NameVirtualHost
Date Thu, 16 Oct 1997 14:39:49 GMT
Rob Hartill <> wrote:

> On Wed, 15 Oct 1997, Doug MacEachern wrote:
> > Dean Gaudet <> wrote:
> >  
> > > That's ugly.
> > 
> > That's Perl :-)  

you're right, that was ugly, here's a nicer way, same end result:

   $VirtualHost{""} = {
	ServerName => ["", ""],

> Fortunately my configs never get that "bad". I can separate things
> off into separate perl hash keys, but other and future mod_perl'ers
> will probably want to do more complex things.

I think one workaround would be to have each $VirtualHost{$ip} in a
separate <Perl> section.  Still not ideal though.

> Ideally, the safest and most flexible solution is to make apache
> accept non-file config input and let mod perl feed that config reader
> a string of config lines. I think Dean said it was probably a simple
> thing to code. Famous last words.
> At the moment Doug's jumping through hoops to reinvent apache config
> parsing in mod_perl. The hoops are getting smaller.

The problem(s) we've just been looking at are how represent the new
virtual host config syntax in Perl.  We'd have to work that out
regardless of config reader hooks, e.g. being able to feed the config
reader a string of config lines would not solve the "rogue Redirect"
problem Dean pointed out.  The current "hoops" are only in these


Where there's some perl bits plus copy-n-pasted code from the same
apache functions (minus the perl_ prefix).  If we can get rid of those,
cool, but we'll still need/use the rest of what's in perl_config.c


View raw message