httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Morgan Gangwere <>
Subject Re: Disable logging of invalid requests
Date Sun, 14 Dec 2008 14:46:32 GMT
Joshua Slive wrote:
> On Thu, Dec 11, 2008 at 11:32 PM, Mitar <> wrote:
>> Hi!
>> Is there a way to disable logging of invalid requests to an HTTP
>> server (which result in a 501 response code)? I would like to log only
>> specific URLs and I am using SetEnvIf with CustomLog to do that, like:
>> SetEnvIf Request_URI "^/$" log_request=yes
>> SetEnvIf Request_URI "^/index.html$" log_request=yes
>> CustomLog "/var/log/httpd-access.log" common env=log_request
>> CustomLog "/dev/null" common env=!log_request
>> But the problem is that those invalid requests are still logged to
>> httpd-access.log file.
> No, some kinds of invalid requests will short-circuit the standard
> request processing for security reasons. (You don't want to run a
> bunch of complex code on input that may be deliberately trying to
> break you.) Part of the code that gets short-circuited is the stuff
> that allows you to do log exclusions.

Well, more accurately, this is kinda backwards. According to the 
"documentation", the syntax for SetEnvIf is

SetEnvIf (statement) (statement) (varname)

You're acctually //setting// a variable here to a particular //value//. 
if this is possible please let me know, as i could use this, as I'm 
having 0 luck getting CustomLog to work.

Morgan Gangwere

Unknown Software
Member, INCOSE [ ] PACA [ ] and NMUG [ ]

[indrora@boxly ~]#_

Find me on FreeNode! ~indrora on ##linux

View raw message