SetEnvIf Config for Proxy

Posted on 2005-05-03
Last Modified: 2008-01-09
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?

Question by:maunded
    LVL 27

    Accepted Solution

    [0-254] is not a valid character class.

    SetEnvIf X-Forwarded-For "^192\.168\.0\." dontlog
    LVL 1

    Author Comment

    Thanks, that did the trick

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting ( to http…
    Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now