Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mod_SetEnvIf

Status
Not open for further replies.

fmuquartet

Programmer
Sep 21, 2006
60
US
I am having trouble with mod_setenvif removing entries from my access logs, where remote_user is has an hyphen '-'.

The idea is to filter out any requests that has '-' where remote_user is stored.


Not working:
SetEnvIf Remote_User "-" dontlog

example of log entry:
192.168.15.101 - - [02/Jul/2008:10:28:26 -0500] "GET

Any help is greatly appreciated.
 
Did you add the dontlog check to the log file entry?
like:

CustomLog /var/log/apache2/access.log combined env=!dontlog
 
Yes. In fact place these variable before the log file entry and did a graceful restart on the server.

Entries:
SetEnvIf Remote_User "-" dontlog
SetEnvIf Remote_User "^-" dontlog
SetEnvIf Remote_User "^-.*$" dontlog
CustomLog "|/usr/sbin/cronolog /var/log/httpd/access-log.%Y.%m.%d.log" combined env=!dontlog
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top