You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Frank Reichenbacher <fr...@mollynet.com> on 2002/04/02 15:29:49 UTC

Script log not logging

www_error_log and www_access_log are correctly generated, rotated, and
logged, but cgi_log does not appear. It doesn't seem like cgi access and
errors are reported in the www_error_log or in the www_access_log. What have
I done wrong here? I'm just starting to set up cgi.

Frank

Relevant httpd.conf sections:

ServerType standalone
ServerRoot /usr/local/apache
ServerName mollynet.com
DocumentRoot /var/www/html
<Directory /var/www/html>
  Options Indexes FollowSymLinks MultiViews
  AllowOverride All
  Order allow,deny
  Allow from all
</Directory>
NameVirtualHost 64.81.16.203:80
<Virtualhost 64.81.16.203:80>
ServerAdmin webmaster@mollynet.com
DocumentRoot /var/www/html
ServerName www.mollynet.com
LogFormat "%h %l %u %t %>s %b \"%r\" \"%{Referer}i\" \"%{User-Agent}i\""
TransferLog "|/usr/local/apache/bin/rotatelogs /var/log/httpd/www_access_log
86400"
ErrorLog "|/usr/local/apache/bin/rotatelogs /var/log/httpd/www_error_log
86400"
ScriptAlias /cgi-bin /var/www/html/cgi-bin
ScriptAlias /_vti_bin/_vti_adm/ /var/www/html/_vti_bin/_vti_adm/
ScriptAlias /_vti_bin/_vti_aut/ /var/www/html/_vti_bin/_vti_aut/
ScriptAlias /_vti_bin/ /var/www/html/_vti_bin
ScriptLog "|/usr/local/apache/bin/rotatelogs /var/log/httpd/cgi_log 86400"
</Virtualhost>




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Script log not logging

Posted by Frank Reichenbacher <fr...@mollynet.com>.
Thank you Owen, however, there is more to it. I did what you suggested
but it still didn't work. It worked fine, however, after I omitted the
pipe to rotatelogs, which ScriptLog apparently does not like one single
bit. The lack of log rotation is tolerable, of course, since ScriptLog
should really only be used for debugging. I suppose rotatelogs can't be
used because it runs as root.

Frank


Owen Boyle wrote:
> 
> Frank Reichenbacher wrote:
> >
> > www_error_log and www_access_log are correctly generated, rotated, and
> > logged, but cgi_log does not appear...
> 
> ScriptLogging is a little tricky. The main difference with the error_log
> and transfer_log is that the logfile must be owned (or at least
> writeable) by the apache User - i.e. not just by root. Secondly, the
> file must exist before apache is started (it won't be created).
> 
> I usually do:
> 
> - login as apache User
> - touch cgi_log
> - su
> - start apache
> 
> rgds,
> 
> Owen Boyle.
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Script log not logging

Posted by Owen Boyle <ob...@bourse.ch>.
Frank Reichenbacher wrote:
> 
> www_error_log and www_access_log are correctly generated, rotated, and
> logged, but cgi_log does not appear...

ScriptLogging is a little tricky. The main difference with the error_log
and transfer_log is that the logfile must be owned (or at least
writeable) by the apache User - i.e. not just by root. Secondly, the
file must exist before apache is started (it won't be created).

I usually do:

- login as apache User
- touch cgi_log
- su
- start apache

rgds,

Owen Boyle.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org