Rotating some log files - best practice


Well-Known Member
Nov 1, 2003
Northern Ontario, Canada
cPanel Access Level
Root Administrator

I've recently been trying to track down large files on my server and have come across a few log files that are not getting rotated, and I'm curious about other thoughts on best practice to deal with these.

1) /usr/local/apache/domlogs/
I'm not sure why this isn't being rotated like the other domlogs and am not sure what to do. I'm not sure where domlog rotation is controlled.

2) /var/log/
This is SSLLogFile for a shared ssl I offer my clients. I'm not really sure why it's there. I suppose it doesn't matter. Should I just create a file for this in /etc/logrotate.d? I sort of understand those files. Anything special I should be aware of?

3) /var/spool/mqueue/.razor/razor-agent.log
I suppose I should also add this to /etc/logrotate.d. I could just purge it now and then, but then I'd have to remember to do it.

Any tips?


Sep 11, 2007


As you already know the cPanel creates statistics for your customers(webalized,awstats....). The data required for the statistics creation is taken from your Apache log files. The logs are not rotated - their data is used and they are being deleted after that.
If you have applications like razor/pyzor... then you have to create your own logrotate script in order to be able to rotate their logs. The reason - the cPanel just does not know about them, they are not a part of its default installation , so it is unable to manage them.
Regarding the "*secure*" file in your "/var/log/" folder - it is created by other external application and "logrotate" entry is the best option in this case.

Best Regards