[prev in list] [next in list] [prev in thread] [next in thread]
List: apache-modperl
Subject: Setting a perl variable in a VirtualHost via a <Perl> section
From: Mark Doyle <doyle () aps ! org>
Date: 2004-03-31 20:34:55
Message-ID: DEC2836B-8352-11D8-B604-000393ADC728 () aps ! org
[Download RAW message or body]
Greetings,
I haven't been able to figure this one out from the available
documentation
and guide. This mod_perl 1.2X...
Currently I have a bunch of virtual hosts with configs like:
<VirtualHost XXXXXXXXX:80>
ServerName foo.aps.org
PerlSetVar APSProduct "FOO"
DocumentRoot /FOO
ResourceConfig conf/homepage.conf
</VirtualHost>
which I want to replace with
<Perl>
foreach my $host (keys %ips) {
my $HOST = uc $host;
$VirtualHost{$ips{$host}} = {
ServerName => $host . $domain,
DocumentRoot => "/$HOST",
ResourceConfig => 'conf/homepage.conf',
}
}
</Perl>
How can I add the PerlSetVar APSProduct "FOO" to the <Perl> section?
The value
of the variable depends on the virtual host of course.
Cheers,
Mark
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic