[CLUE-Admin] webserver maintenence notes

Jed S. Baer thag at frii.com
Wed Mar 31 17:48:18 MST 2004


On Wed, 31 Mar 2004 15:53:31 -0700
CLUE President <president at clue.denver.co.us> wrote:

> Logrotate is not running on the http access file - it contains every
> access record since we fired up this server.

And that brings to mind the question of why we're saving access logs from
2000 forward.

Here's my proposed config (to put in place tonight, before this month's
webalizer cron runs).

[webalizer.conf]
LogFile /var/apache/logs/access_log.1.gz
OutputDir /var/apache/htdocs/admin/webalizer
Quiet yes
PageType htm*
PageType cgi
PageType pl
PageType php*
MangleAgents 1
Incremental yes
HideSite clue.denver.co.us
HideSite cluedenver.org
HideSite localhost
HideReferrer clue.denver.co.us
HideReferrer cluedenver.org
HideReferrer Direct Request
HideURL     *.gif
HideURL     *.GIF
HideURL     *.jpg
HideURL     *.JPG
HideURL     *.png
HideURL     *.PNG

[logrotate-httpd.conf]
/var/apache/logs/access_log /var/apache/logs/error_log {
    monthly
    rotate 6
    missingok
    compress
    sharedscripts
    postrotate
        /var/apache/bin/apachectl graceful
        /usr/local/bin/webalizer
    endscript
}

Then the cron job would do:
  /usr/sbin/logrotate /path/to/logrotate-httpd.conf

The last assumes logrotate isn't running as a regular nightly job, and the
logrotate conf for httpd file will go someplace where logrotate won't find
it, if it gets fired up some other way (i.e. looking for
/etc/logrotate.d/)

Also, this assumes we don't keep more than 6 months of Apache logs.
Anybody wants to keep them longer, I'll whip up a shell script to archive
them with a datestamped filename.

jed

-- 
http://s88369986.onlinehome.us/freedomsight/

... it is poor civic hygiene to install technologies that could someday
facilitate a police state. -- Bruce Schneier



More information about the clue-admin mailing list