You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Michael E. Lewis" <ml...@comprehend.com> on 2002/05/16 04:08:28 UTC

Error messages for VirtualHosts written to wrong log

I sure hope I'm not asking a stupid question here.  We are
preparing to upgrade our production mod_perl servers:
From:                   To:

RedHat 6.2              RedHat 7.2
kernel-2.2.19-6.2.7     kernel-2.4.9-31
Apache_1.3.12           Apache_1.3.23
mod_perl-1.24           mod_perl-1.26

I have the above "To" configuration installed on a staging system
and I am having a problem with the error logging for VirtualHosts
on that system.  Specifically, messages written to STDERR for a
VirtualHost are getting written to the general server error_log
instead of the error_log specified for the VirtualHost.  The
VirtualHost configuration I am using for this works correctly in
the production environment, but not in the staging environment.
Here are excerpts from the httpd.conf file which is essentially
the same on both the production and staging servers:

        :
ErrorLog /opt1/httpd_perl/logs/error_log
        :
# The back-end server configuration for The GelCompany
# (gelco5.yvod.com) using port 8089 on the backend:
NameVirtualHost 192.168.20.111:8089
Listen 8089
<VirtualHost 192.168.20.111:8089>
    ServerAdmin webmaster@yvod.com
    ServerName gelco5.yvod.com
    DocumentRoot /www/gelcompany/html

    ErrorLog /www/gelcompany/logs/error_log
    CustomLog /www/gelcompany/logs/access_log combined

    Alias / /www/gelcompany/modperl

    # Configuration for modperl
    <Location />
        SetHandler perl-script
        PerlHandler YVOD::welcome
        Options ExecCGI
        Allow from all
        PerlSendHeader On
    </Location>
</VirtualHost>

In both environments, pages for various VirtualHosts display
correctly, but in the staging environment all messages written
from within the handler, welcome.pm, and subroutines called by
the handler, are written to the wrong log.  I've read the Apache
and modperl documentation, change logs, and mail lists and have
not been able to find any mention of a similar problem.  I'm
sure I must have some problem with my configuration, but I can't
see it.  Please let me know if you need any further information
about the problem.

Thank you, Michael...
-- 
Michael E. Lewis         YVOD, LLC / Comprehend.Com    Phone: 510-655-3974
mlewis@comprehend.com    5816 Ocean View Drive         Cell:  510-435-3180
michael@yvod.com         Oakland, CA  94618-1535       Fax:   419-781-9206

Re: Error messages for VirtualHosts written to wrong log

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

Michael E. Lewis wrote:

> I sure hope I'm not asking a stupid question here.  We are
> preparing to upgrade our production mod_perl servers:
> From:                   To:
> 
> RedHat 6.2              RedHat 7.2
> kernel-2.2.19-6.2.7     kernel-2.4.9-31
> Apache_1.3.12           Apache_1.3.23
> mod_perl-1.24           mod_perl-1.26
> 
> I have the above "To" configuration installed on a staging system
> and I am having a problem with the error logging for VirtualHosts
> on that system.  Specifically, messages written to STDERR for a
> VirtualHost are getting written to the general server error_log
> instead of the error_log specified for the VirtualHost.  The
> VirtualHost configuration I am using for this works correctly in
> the production environment, but not in the staging environment.
> Here are excerpts from the httpd.conf file which is essentially
> the same on both the production and staging servers:

this was reported by Matt here:

   http://marc.theaimsgroup.com/?l=apache-modperl&m=98190005604037&w=2

we really don't have a resolution to this, save a few comments from 
Doug in the STATUS file (currently only in mod_perl CVS)

"i would expect stderr to only ever be opened to the main
server log at startup.  otherwise, we'd need to redirect stderr at the
start of every request and restore it at the end.  seems expensive.
i would be suprised if this every worked as matt expected it
to.  -dougm"

I'm not sure if this helps, but I think this is all anyone knows about 
the issue.  sorry.

--Geoff