At 11:07 -0800 1/26/04, Stas Bekman wrote:
Geoffrey Young wrote:
Elizabeth Mattijsen wrote:
I have the configuration of a number of virtual hosts in a database. Only those virtual hosts are handled by the Apache 2 server. Basically, all requests are handled by the same Perl code. And everything is set up from a PerlRequire file.
This is all fine and dandy, but I would like each virtual host to have its own access and error log. And I'm lost in the MP2 documentation on how to do that from the PerlRequire file. There is some documentation about such a feature in Apache::PerlSections, but I'd rather not use Perl sections in the httpd.conf
I think even if you will have a separate error log files, most things will still be logged into the main error log, unless you log things explicitly via $r or $s objects. (i.e. plain perl calls like warn/die/etc. will not know where the vhost error_log is)
Well, the error log wouldn't be such a problem. There is an advantage to getting all of the errors in one place. But the access logs, now that would be nice... ;-)
At the moment you can try to traverse the servers chaing using the following idiom:
my $s = Apache->server; for (;$s;$s=$s->next) { $s->add_config([....]); }
that gives you an access to each of the vhosts (that were configured so far), so you probably want to run this once you've added all your vhosts. Also you will have to figure out who is who, with some extra calls on $s.
But I think we should figure out how to fix it to do the right thing, stay tuned at the dev list. See:
http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=107476838714506&w=2
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
-- Reporting bugs: 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