[Techtalk] apache request_log rotation - logrotate

Chris Henderson henders254 at gmail.com
Tue Sep 9 12:07:44 UTC 2008


I am trying to rotate this log at 2200 each night on OpenSUSE 10.3. I
added this to /etc/logrotate.d/apache2 file

I, then, edited root's crontab and added 0 22 * * *
/usr/sbin/logrotate -f /etc/logrotate.d/apache2. I run the script
manually and can see logrotate does nothing - the log file is still
sitting there - 192K in size. Logrotate rotates the log in it's own
time. I am not sure how it does this though - could it be by
cron.daily?

Here is my /etc/logrotate.d/apache2 file:

/var/log/apache2/ssl-request_log {
dateext
daily
maxage 365
missingok
create 644 root root
postrotate
/etc/init.d/apache2 reload
endscript
}

This file already has a lot of other entries by Apache/ OpenSUSE. I
just added the above to the file.

I know there are many other programs or Apache modules out there
that'll do the job. But I want to stick to whatever comes with the
base sytem: logrotate.

Thanks for any help.


More information about the Techtalk mailing list