Re: Disable logging of invalid requests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Joshua Slive wrote:
On Thu, Dec 11, 2008 at 11:32 PM, Mitar <mmitar@xxxxxxxxx> 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
http://sonof.bandit.name/
Member, INCOSE [ incose.org ] PACA [ paca.org ] and NMUG [ nmug.net ]

[indrora@boxly ~]#_

Find me on FreeNode! irc.freenode.net ~indrora on ##linux
begin:vcard
fn:Morgan Gangwere
n:Gangwere;Morgan
org:Unknown Software;Programming
email;internet:0.fractalus@xxxxxxxxx
title:Developer
tel;work:+1 505 514 2863
note;quoted-printable:Identities:=0D=0A=
	Indrora on irc:=0D=0A=
	irc.freenode.net=0D=0A=
	=0D=0A=
	Various IM clients:=0D=0A=
	Yahoo: trogdor_t_b=0D=0A=
	GTalk(jabber): 0.fractalus@xxxxxxxxx=0D=0A=
	MSN: fractalscapes@xxxxxxxxxxxx=0D=0A=
	=0D=0A=
	H4x my modem!=0D=0A=
	uks-is.boldlygoingnowhere.org=0D=0A=
	There ARE open ports.
x-mozilla-html:FALSE
url:http://sonof.bandit.name
version:2.1
end:vcard


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux