[TriLUG] OT - Apache access_log ignore request
Howard Boyd II
boyd at qualexphoto.com
Tue Apr 6 10:17:26 EDT 2004
I have an application that is sending a request to my Apache server and
the request is filling up the access_log. The entry in the access_log
looks like:
<ip of sender> - - [06/Apr/2004:10:00:09 -0400] "GET
/servlet/STestWebServer?COMMAND=TEST HTTP/1.0" 200 3
I would like to modify my httpd.conf file to ignore logging of these
specific requests. Ideally, I would like to ignore logging any request
of the form "/servlet/STestWebServer?COMMAND=TEST". I have modified the
httpd.conf file as follows:
# Configure to Ignore Unnecessary log records
SetEnvIf Request_URI "/servlet/STestWebServer" ignore
...
CustomLog /logs/http/OrderStatus/access_log common env=!ignore
The above works for me but isn't the exact pattern. If I modify the
above to:
# Configure to Ignore Unnecessary log records
SetEnvIf Request_URI "/servlet/STestWebServer?COMMAND=TEST" ignore
...
CustomLog /logs/http/OrderStatus/access_log common env=!ignore
It doesn't work. The pattern matching fails.
I'm assuming this has something to do w/ special characters (the
question mark?)? I've tried escaping things and various other tricks to
no avail. Could someone please tell me how to match the pattern exactly?
Thanks!
Howard
***********************************
* In my dreams, your dreams come true.
* Song: In My Dreams
* Artist: Josh Turner
* CD: Long Black Train
***********************************
More information about the TriLUG
mailing list