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)
try $s->add_config - it injects configurations right into the server (in .htaccess-like fashion, with the same protections). be sure to check the return value unless you're using current CVS.
That won't work at the server startup. Your $s acquired via Apache->server is the base server. I've raised this issue on the dev list, awaiting your comments. That issue also relates to the problem I've mentioned above.
__________________________________________________________________ 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