Changing Log Rotation

srqwebguy

Verified User
Joined
Apr 22, 2007
Messages
79
Our default on Apache logs seems to be a single day use, and then they are deleted. What function takes care of this, and how can we change this? I would like to keep 2 months worth of log files on the server. It doesn't matter if they tarball every night, but we want to be able to download and analyze our traffic.

How can we change the rotation schedule?

Thanks.
 
Hello,

Related:
Admin Level -> Admin Settings -> Keep Number of Apache Log Backups: 5

Which means that 5 days of logs are rotated into:
/home/user/domains/domain.com/logs

You can crank that value up to 60 if you want 60 days.

The reason for daily backups is for webalizer, as the documentation mentions that live logs should not be used for processing, thus DA renames to domain.com.log.1, and lets webalizer chew on the closed file.

Another option is to disable rotation by adding:
Code:
rotation=0
to your directadmin.conf and restart DA.
Note that by doing this, you now are responsible for rotating the logs (use logrotate or something similar)

http://www.directadmin.com/features.php?id=507

John
 
Back
Top