I'm trying to limit the size of my log files for my web folder. access.log is getting so large that it is taking a while to access it.
It seems that I've done something because there are new log files created, but my log folder looks like this:
Quote:
access.log 0
error.log 0
access.log.1 0
error.log.1 0
access.log.2 80,413,564
error.log.2 3,718,266
Obviously, the log is rotating, but the information is all coming along to the new log rather than staying behind in the archive log.
Here is what I have. I added the following to /etc/logrotate.conf:
Quote:
# system-specific logs may be configured here
/home/user/public/website.org/log/*.log {
missingok
daily
rotate 30
create 640 root user
}
My /etc/cron.daily/logrotate looks like:
Quote:
#!/bin/sh
test -x /usr/sbin/logrotate || exit 0
/usr/sbin/logrotate /etc/logrotate.conf
Also, I'm not sure what the "test -x" line is about. Can I delete that??
Thanks in advance for any advice.