Link to home
Start Free TrialLog in
Avatar of maunded
maunded

asked on

SetEnvIf Config for Proxy

Hi,
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?
Thanks!
D.

ASKER CERTIFIED SOLUTION
Avatar of caterham_www
caterham_www
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of maunded
maunded

ASKER

Thanks, that did the trick