How to keep longest access_log for all accounts???

SlyGhost

Member
Feb 15, 2005
11
0
151
Hi,

I was wondering what setting I should check for keeping longest access_logs for every domain.

For example when I check ls -la /usr/local/apache/domlogs , I see every domain's log files there but when I download one , I see its rotated daily around 3am every day , so its a DAILY log and I can't check 2 days ago :(

I want to keep those files lets say for 3 days , NOT auto deleted/updated daily, let them keep for 3 or more days and then delete/update automatically...

WHM > Main >> Server Configuration >> Tweak Settings > Stats and Logs > Number of days between processing log files and bandwidth usage (default 1, decimal values are ok) = I saw that one was set to 1 , if that was causing???

Is there any other setting I should look for to make all those logs be kept for more than 1 day ? lets say 3 days ... (NO need to compress and keep as backups , I dont need it , I only need those real log files be kept for 3 or more days...)

Another question, is it possible to make it lets say "domain1 = keep the log for 2 days , domain2 = keep it for 7 days..." ???

Thanks in advance...
 

eth00

Well-Known Member
PartnerNOC
Mar 30, 2003
721
1
168
NC
cPanel Access Level
Root Administrator
That option is how often the cPanel stats software processes them.

In tweak settings you could turn off the out rotate logs daily.

If you want to have different dates to rotate them I would suggest looking at "logrotate" and setting up a custom ruleset for your domlogs directory. cPanel either has every day or none at all, relying on logrotate.
 

PlatinumServerM

Well-Known Member
PartnerNOC
Jul 10, 2005
400
3
168
New Jersey, USA
cPanel Access Level
Root Administrator

SlyGhost

Member
Feb 15, 2005
11
0
151
I've changed this one:

WHM > Main >> Server Configuration >> Tweak Settings > Stats and Logs > Number of days between processing log files and bandwidth usage (default 1, decimal values are ok) = 5

and looks like it didn't clean logs yet since 24 hours , I will see tomorrow if its still growing until 5 days , if so , I will make it to keep for a reasonable time like 3 days... Just I don't want daily , 2 days or 3 days is ok for me :)

Thanks a lot for all the responses ;)