[BlueOnyx:18213] Re: Webalizer on 5108R fails to update
Michael Stauber
mstauber at blueonyx.it
Thu Aug 20 21:10:08 -05 2015
Hi Chris,
> My understanding is that's because we've already done a log rotation today.
That's correct.
The real "magic" for this is here in the logrotate configuration for Apache:
/etc/logrotate.d/apache
/var/log/httpd/access_log {
daily
prerotate
rm -rf /tmp/.logrotate_apache_access >/dev/null 2>&1
cp /var/log/httpd/access_log /tmp/.logrotate_apache_access
>/dev/null 2>&1
endscript
missingok
notifempty
sharedscripts
postrotate
/bin/kill -HUP `pidof httpd` 2> /dev/null ; /bin/kill -HUP
`pidof httpd` 2> /dev/null || true
/usr/local/sbin/split_logs web < /tmp/.logrotate_apache_access
rm -f /tmp/.logrotate_apache_access >/dev/null 2>&1
/usr/bin/webalizer.pl
endscript
}
The relevant part for the sitestats is this here:
/usr/local/sbin/split_logs web < /tmp/.logrotate_apache_access
That actually splits up the logs and rotates them into the Vsite logs
directories. See if you can replicate that by running this here:
cp /var/log/httpd/access_log /tmp/.logrotate_apache_access
/usr/local/sbin/split_logs web < /tmp/.logrotate_apache_access
And see what that does.
--
With best regards
Michael Stauber
More information about the Blueonyx
mailing list