I have a proxy server which serves requests from my webservers, it adds a X-Forwarded-For header to each request.
I want to be able to not log requests which come from my internal network, eg 192.168.0.x
I have this line in my httpd.conf:
SetEnvIf X-Forwarded-For "^192\.168\.0\.[0-254]$" dontlog
and then in the virtual server config:
CustomLog "|/usr/local/apache2/bin/cronolog /usr/local/apache2/logs/access_%Y-%m-%d" "combined" env=!dontlog
Where am I going wrong?