![]() ![]() ![]() ![]() ![]() |
|
back main next You need to rotate apache's log files. Whether you rotate them daily, weekly, mothly etc. depends on how much traffic your site gets and the amount of data that you log. You can rotate apache log files a few different ways that I know of. See the apache documentation site and read the section on "Log Files" for details. I personally like a program called cronolog because t's highly configurable. files needed installation instructions using cronolog unmodified example The above example shows how to pipe your log files through cronolog. Using the variables "%m %d and %Y" will rotate the logs every day and name the file "01-10-2002-access.log" if it were Jan 10, 2002. customizing cronolog named folder example This will create "/logs/2002/01/10-access.log" for a log generated on Jan 10, 2002. Every month a new folder corresponding to that month will be created with access logs stamped with the day of the month at the beginning of the filename. Of course it will create a new folder for corresponding year changes as well. If you only want to rotate logs once a month you can exclude using the "%d" day value monthly rotation
example This will create /logs/2002/01-access.log for a log generated in the month of Jan, 2002 etc. reference material:
http://www.cronolog.org http://httpd.apache.org/docs
|