Geoffrey Young wrote:Elizabeth Mattijsen wrote: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)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
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... ;-)
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.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.
If necessary, I will just have to add a step that would generate the config file from the database seperately (e.g. by hacking bin/apachectl) before starting the actual apache process. But that would be very hackish... ;-)
Liz
-- 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