[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] awstats - some corrections



hi

if somebody installed awstats from http://www.nuonce.net/awstats-cobalt.php

there will be a script in
/etc/cron.daily/zz_awstats-run.pl

working daily.
This is not the best solution, because logrotate (which runs bevore it) can
destroy the last day data.

Therefore I recommend to move the file to /root/ and then modify
/etc/logrotate.d/apache

to

/var/log/httpd/access {
    prerotate
        /usr/local/sbin/split_logs web < /var/log/httpd/access
        /root/awstats-run.pl                              ## INSERT THIS
LINE HERE
    endscript
    missingok
    postrotate
        /usr/bin/killall -HUP httpd 2> /dev/null || true
    endscript
    daily
}

Now you will not loose any more data in the stats.

HTH
herby