On Tue, 26 Aug 2003 11:12:10 +0000, Davide Bianchi wrote:
> Brian <briansz DeleteThis @sitemouse.com> wrote:
>> Can anyone point me toward a web how-to or reference that demonstrates how
>> to exclude local IP addresses from my logfiles?
>
<font color=purple> > See <a style='text-decoration: underline;' href="http://httpd.apache.org/docs-2.0/env.html</font" target="_blank">http://httpd.apache.org/docs-2.0/env.html</font</a>>
>
>> I Can't find a version # anyplace
>
> httpd -v will tell you.
>
>> Also, to what extent can Analog reports be customized?
>
> As much as you want, it depends how much you want to tinker with it.
>
>> Does another package/program provide this functionality?
>
> webalizer is also nice.
>
> Davide
Davide,
I tried what you suggested, and it turns out I am running v1.3.36. So I
viwed the analogous apache 1.3 docs pages. I printed out and studied the
sections on Log Files, Module mod_setenvif, and Environment
Variables in Apache. This is somewhat helpful, but at my level of
comprehension, something with more actual examples would be welcome.
My programming experience consists of an intro to BASIC on Apple II
equipment in the seventh grade (circa 1986), and while I'm not incapable
of editing Linux config files, the structure of these commands is not
familiar.
I tried adding the following lines below the 'Customize behavior based on
the browser configuration' section of /etc/httpd/conf/httpd.conf file and
restarted the httpd daemon:
#
# Enable conditional logging
#
<IfModule mod_setenvif.c>
#
# Mark requests from the loop-back interface
SetEnvIf Remote_Addr "127\.0\.0\.1" dontlog
# Mark requests from the local subnet
SetEnvIf Remote_Addr "192\.168\.1\.1" dontlog
# Log what remains
CustomLog /var/log/httpd/access_log common env=!dontlog
</IfModule>
That didn't work. I'm still getting localhost and 192.168.1.1 log entries.
So then I tried changing the log location from /var/log/httpd/access_log (the
actual location of the file) to logs/access_log (I assume as referenced to
apache root).
#
# Enable conditional logging
#
<IfModule mod_setenvif.c>
#
# Mark requests from the loop-back interface
SetEnvIf Remote_Addr "127\.0\.0\.1" dontlog
# Mark requests from the local subnet
SetEnvIf Remote_Addr "192\.168\.1\.1" dontlog
# Log what remains
CustomLog logs/access_log common env=!dontlog
</IfModule>
That doesn't work either.
What am I missing? Is the location of this string in the ~/httpd.conf
file improper, or is the command syntax incorrect? I used what is
available on the mentioned apache 1.3 doc pages as a template.
Regards,
Brian
briansz DeleteThis @sitemouse.com<!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: Apache logfile and Analog report customization