I added the following lines to my /etc/logrotate.conf for each log file I had to deal with
/usr/local/apache/logs/actionconference_log {
copytruncate
rotate 4
weekly
errors [EMAIL PROTECTED]
compress
postrotate
/usr/bin/killall -HUP httpd
endscript
}
-----Original Message-----
From: Gordon Messmer
To: [EMAIL PROTECTED]
Sent: 3/4/03 11:11 PM
Subject: Re: How to set automatically rename the old access_log to access_log.1 and create a new access_log file ?
Kevin Chan wrote:
>Some of my program will create a access_log on /server/logs/. But the
size
>of the log is huge after a 2 weeks, how can I set the access_log on
>/server/logs/ will automatically rename the old access_log to
access_log.1
>and create a new access_log for reduce the file size ?
>
>
man logrotate
The easiest way is to copy one of the files in /etc/logrotate.d/
(possibly httpd or apache) to a new file and use it as a template. Edit
the values to rotate your own server's logs.
--
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list