httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <>
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 <> 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 "" 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 "" 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


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message