httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Hartill <r...@imdb.com>
Subject Re: NameVirtualHost
Date Thu, 16 Oct 1997 16:44:15 GMT
On Thu, 16 Oct 1997, Doug MacEachern wrote:

> 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.

I don't follow. The string is a direct equivalent of the config files.
Anything that can be achieved from a config file can be copied by
a config string.

Maybe I'm not making myself clear or am missing someone else's point.

Perl has no problem creating strings on the fly. If a string is as good
as a file then Perl has no problem creating config file equivalents on
the fly.

The current hash based mod_perl implementation of config preprocessing
can lose information, either through config ordering or unintentionally
overwritting hash entries.

> The current "hoops" are only in these
> functions: 
> 
> 	perl_urlsection
> 	perl_dirsection
> 	perl_virtualhost_section
> 	perl_filesection
> 	perl_limit_section

Indeed. It's possible to do away with them all and significantly
simplify things if instead of telling folks to use (e.g.)

VirtualHost{"foo"}{"ServerName"} = "foo";
VirtualHost{"foo"}{"Logformat"} = "%h \"%r\"";

they used:

$give_this_to_apache .= "<VirtualHost foo>
ServerName foo
Logformat "%h \"%r\""
</VirtualHost>
";

and instead of

$MaxRequestsPerChild = 123;

they used:

$give_this_to_apache .= "MaxRequestsPerChild 123\n";


mod_perl's config <Perl> X </Perl> section would then become:

eval(X)
apache_config_reader($give_this_to_apache);


I don't see any functionality being lost in that approach, but it does
allow any features currently not supported in <Perl></Perl> and *any*
future config features to be instantly supported.


yes/no ?

--
Rob Hartill                              Internet Movie Database (Ltd)
http://www.moviedatabase.com/   .. a site for sore eyes.


Mime
View raw message