Apache: Log messages from CGI to own file

I would like to have all the output from the (perl) CGIs in its own log file.

What i tried:

Setting ScriptLog /var/log/httpd/cgi.log in httpd.conf, but this had no effect. Probably something else is missing.

Any ideas?

Replay

ScriptLog only logs errors. You can use comparison values at the end of the CustomLog statement to output specific events into another log. I think something like this will do what you want (tested):

    SetEnvIf Request_URI "^/cgi-bin/" cgilog
    CustomLog ${APACHE_LOG_DIR}/access.log combined env=!cgilog
    CustomLog ${APACHE_LOG_DIR}/cgi.log combined env=cgilog

Category: apache 2.2 Time: 2016-07-29 Views: 3

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.197 (s). 12 q(s)