10.3: A heads-up on Apache log file rotation

Dec 13, '03 01:49:00PM

Contributed by: idf

Since installing 10.3, I noticed that my Apache logs were being rotated weekly in the early hours of Saturday morning. Worse still, each week, instead of renaming .0.gz to .1.gz, the files were being deleted, losing the log file information.

It appears that Apple has added Apache log rotation to the 'periodic weekly' script which crontab runs, but failed to mention this fact. I checked my PowerBook (still on 10.2.8) and it doesn't have the Apache log rotation in the weekly script.

As for the renaming problem, it appears that any other files present in /var/log/httpd were causing the problem. Moving them allows the script to function correctly.

Comments (3)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20031207082244425