Forum Moderators: bakedjake

Message Too Old, No Replies

Logrotate.conf

how to rotate & not delete multiple log files

         

operafan

2:31 am on Dec 3, 2003 (gmt 0)

10+ Year Member



Hi, I've set in my httpd.conf files for 4 sites to each have their own log files named respectively.
While the main site is rotating & compressing whilst using the default logrotate.conf file the others are not.
I've also changed the logrotate conf files as specified below but dont know how to apply it for the other log files which is all in the default log folder.

compress
missingok
rotate 5
weekly

/var/log/httpd/access_log /var/log/httpd/error_log {
sharedscripts
size=4M
prerotate
/bin/web_logs.sh
endscript
postrotate
kill -HUP `cat /var/run/httpd.pid`
endscript
}

/var/log/maillog {
size=500k
}

include /etc/logrotate.d

Based on this conf file, so which will make it rotate my file rotate weekly or once it has reached 4 MB?

& for not to delete the log file after compression which command should I put & where should i put it?

I found this site but was not sure how to use the commands for not deleting it
[rt.com...]