Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

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

share|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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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