Apache access_log exclusion

kevinthenerd

Platinum Member
Jun 27, 2002
2,908
0
76
How do I exclude local traffic (192.168.0.*) from my httpd access logs? I wrote a little script that strips the logs of these entries, but there's got to be a cleaner way.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
I don't know the answer directly, but I remember there was a way to keep code red traffic out of your logs. You can try to find that answer and modify it to fit your needs.
 

kevinthenerd

Platinum Member
Jun 27, 2002
2,908
0
76
Originally posted by: n0cmonkey
I don't know the answer directly, but I remember there was a way to keep code red traffic out of your logs. You can try to find that answer and modify it to fit your needs.

The answer was simply to make a default.ida file in your webroot to prevent the 404 pages. That won't work in my situation considering that I need it to be host-based, not file-based.
 

ConnyG

Member
Jun 19, 2001
68
0
0
In httpd.conf:

SetEnvIf Remote_Addr "192\.168\.0\..*" dontlog

CustomLog logs/access_log common env=!dontlog