httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <jos...@slive.ca>
Subject Re: [users@httpd] Set Environment for range of addresses
Date Sat, 04 Aug 2007 16:11:41 GMT
On 8/4/07, Crash Dummy <gmane@thedatalist.com> wrote:
> I want to disable logging for a range of LAN addresses. I can set an environment
> variable for a single address like so:
>
> SetEnvIf Remote_Addr "192.168.0.1" dontlog
>
> That works fine. I can also set multiple addresses if I enter a line for each
> one, but if I try to set a range of addresses thus:
>
> SetEnvIf Remote_Addr "192.168.0.0/16" dontlog
>
> it doesn't work. Am I asking the impossible?

SetEnvIf accepts only regular expressions, not CIDR notation.
Fortunately, most groups of IP addresses can be expressed with regexes
(although often with a little more effort). What you want is simple:

SetEnvIf Remote_Addr ^192\.168\. dontlog

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message