up vote 1 down vote favorite
share [g+] share [fb]

I'm using a Collabnet svn distribution on linux, and the log files are configured through the standard apache httpd.conf. It's been a while since I dealt directly with apache, but my memory and google seem to indicate that the only way to rotate apache log files is outside of apache, using a periodic script.

Is there some convenient way I'm missing to rotate these?

link|improve this question
feedback

1 Answer

up vote 1 down vote accepted

Apache provides a tool call "rotatelogs". It can be configured inside the httpd.conf file, so no need to schedule a tool to do the rotation.

See this page for more information: rotatelogs - Piped logging program to rotate Apache logs

link|improve this answer
Doesn't that first sentence sort of contradict itself? Essentially what it comes down to is "Apache provides a tool you can use to schedule log rotation, so you don't need to schedule a tool to do log rotation" :P , +1 from me. – John T Mar 18 '10 at 20:12
Not sure I understand your comment ... the rotation tool is external but does not need to be scheduled in crontab/Scheduled Tasks. It's called directly from the conf file and manages the rotation on its own. Thx for the +1. – Snark Mar 18 '10 at 20:16
That's what I was looking for. It'd be even better if it allowed you to retain only a certain number of archives, but that's easy enough to do. – Andrew B Mar 18 '10 at 20:18
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.