This is a discussion on SetEnvIF Remote_Addr "192\.168" nolog within the Apache Web Server forums, part of the Web Server and Related Forums category; The above directive seems to suppress logging for everything, not just the intranet. Am I doing something wrong? I'm ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
On Wed, 07 May 2008 06:46:57 -0400, Marten Kemp
<marten.kemp@thisplanet-link.net> wrote: >The above directive seems to suppress logging >for everything, not just the intranet. Am I >doing something wrong? > >I'm running apache 2.2.3; Debian 2.8.16 kernel. Google for ``setenvif customlog "Version 2.2" -"List-Post" site:httpd.apache.org`` (without the ``) The SetEnvIf (or SetEnvIfNoCase) directive by itself only sets an environment variable. http://httpd.apache.org/docs/2.2/mod....html#setenvif You have to configure the accesslog as described in http://httpd.apache.org/docs/2.2/logs.html#accesslog , ( see the Conditional Logs paragraph, just above http://httpd.apache.org/docs/2.2/logs.html#rotation ) Of course you also have to enable the mod_setenvif and mod_log_config modules. HTH -- ( Kees ) c[_] A mainframe: The biggest PC peripheral available. (#123) |
|
|||
|
"Marten Kemp" <marten.kemp@thisplanet-link.net> schreef in bericht
news:fvs1b0$vr2$1@aioe.org... > The above directive seems to suppress logging > for everything, not just the intranet. Am I > doing something wrong? > > I'm running apache 2.2.3; Debian 2.8.16 kernel. > There is an example just above this link http://httpd.apache.org/docs/2.2/logs.html#rotation Do change your line to SetEnvIF Remote_Addr "^192\.168" nolog otherwise you will not log p.e. 5.192.168.12 or 17.9.168.192 too! HansH |
|
|||
|
HansH wrote:
> "Marten Kemp" <marten.kemp@thisplanet-link.net> schreef in bericht > news:fvs1b0$vr2$1@aioe.org... >> The above directive seems to suppress logging >> for everything, not just the intranet. Am I >> doing something wrong? >> >> I'm running apache 2.2.3; Debian 2.8.16 kernel. >> > There is an example just above this link > http://httpd.apache.org/docs/2.2/logs.html#rotation > > Do change your line to > SetEnvIF Remote_Addr "^192\.168" nolog > > otherwise you will not log p.e. 5.192.168.12 or 17.9.168.192 too! Aha! Thanks, it seems to be working now. I *thought* I read the Friendly Manual, just not closely enough. I have it here at http://enthusiasts.dyn-o-saur.com/ma....html#rotation (yeah, I loaded the dox and put a link in my first crude webpage. Doesn't everyone? <grin>) -- -- Marten Kemp (Fix name and ISP to reply) |
| Thread Tools | |
| Display Modes | |
|
|