perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hermida, Leandro" <>
Subject RE: Error messages go to server ErrorLog not to VirtualHost ErrorLog
Date Fri, 17 Nov 2006 09:06:33 GMT


Here is what I have in my global server httpd.conf:

# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
# Do not add a slash at the end of the directory path.  If you point
# ServerRoot at a non-local disk, be sure to point the LockFile
# at a local disk.  If you wish to share the same ServerRoot for
# httpd daemons, you will need to change at least LockFile and PidFile.
ServerRoot "/usr/local/apache2"


# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
ErrorLog logs/error_log


# Virtual hosts
Include conf/extra/httpd-vhosts.conf


Now in the extras/httpd-vhosts.conf I have:


<VirtualHost *:80>
    DocumentRoot /var/www/myapp/htdocs
    # ServerAlias
    ErrorLog /var/www/myapp/logs/error_log
    ScriptLog /var/www/myapp/logs/error_log
    CustomLog /var/www/myapp/logs/access_log common
    <Location />
        Options -Indexes FollowSymLinks -ExecCGI
        # AllowOverride None
        Order Deny,Allow
        Deny from All
        Allow from 172.28. 172.29.
    Alias /web_perl/  /var/www/myapp/web_perl/
    <Location /web_perl>
        SetHandler perl-script
        PerlResponseHandler ModPerl::Registry
        PerlOptions +ParseHeaders
        Options -Indexes FollowSymLinks +ExecCGI
    PerlPostConfigRequire /var/www/myapp/web_startup/
    PerlTransHandler +MyApp::Apache2::RewriteURI


So in my scripts running under ModPerl::Registry if I do a 

print STDERR "Some message";

to debug then it goes to the global error log at
/usr/local/apache2/logs/error_log not at the desired place


-----Original Message-----
From: Fred Moyer [] 
Sent: Friday, November 17, 2006 05:38
To: Hermida, Leandro
Subject: Re: Error messages go to server ErrorLog not to VirtualHost

Hermida, Leandro wrote:
> Hello,
> I have a problem related to this with CGI scripts which I am porting 
> to mod_perl 2 and presently running under ModPerl::Registry.  I have a

> VirtualHost were I have enabled mod_perl and ModPerl::Registry as the 
> handler.  I have set the ErrorLog directive in this VirtualHost to a 
> different file than the global server ErrorLog.  For debugging and 
> testing of my code I typically do a
> print STDERR "Here is a message";
> inside of a script.  The problem is that it always goes to the global 
> server ErrorLog not to the VirtualHost ErrorLog.  It didn't do this in

> mod_perl 1.  Am I doing something wrong?

Can you post the relevant snippet from your httpd.conf?

View raw message