This is a discussion on Turn off logfile rotation within the Linux Web Servers forums, part of the Web Server and Related Forums category; Hi, I recently set up an apache webserver. I noticed that fairly regularly (every two days or so) all of ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi, I recently set up an apache webserver. I noticed that fairly
regularly (every two days or so) all of my apache logs (error_log, access_log, etc) get renamed to error_log.1, access_log.1, etc. I never enabled this feature as far as I know, and I'd really like to turn it off. It's not renaming the files because they're too large, in fact they were quite small (less than 3KB), so I find this behavior annoying. I wouldn't mind file rotation if the files got to 100 MB or so, but no sooner. Can someone shed some light on changing this file rotation feature? |
|
|||
|
> If your system is a different Linux distro, or a different OS, look
> elsewhere. 'man logrotate' may help. I'm on RH 9.0. I added the following line to /etc/logrotate.d/httpd: /var/log/httpd/*log { missingok notifempty size=100M # this is my new line sharedscripts postrotate /bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true endscript } However, I don't see what rule it was following previously to trigger the rotation. There is the line "weekly" in my /etc/logrotate.conf, so perhaps that was triggering it. Will the size=100M directive override weekly rotation? (Which gets priority time or size?) |
|
|||
|
kimspiracy@yahoo.com (Kim) writes:
> However, I don't see what rule it was following previously to trigger > the rotation. There is the line "weekly" in my /etc/logrotate.conf, so Default value. > perhaps that was triggering it. Will the size=100M directive override > weekly rotation? (Which gets priority time or size?) Not sure, the man page doesn't say. I suspect it will just override the default value. -- Chris |