jeff3

Member
Oct 3, 2006
5
0
151
Hello,
I'm confused as to why the entries in /usr/local/cpanel/logs/ log files are being deleted after 7 days. Where can I modify this setting? I most likely want to set up logrotate once I keep the files from being cycled.
 

WeMasterz5

Well-Known Member
Feb 24, 2003
361
0
166
Miami
maybe via your WHM

Tweak Settings/Stats and Logs



.
 

angelina_holy

Well-Known Member
Aug 6, 2006
113
0
166
You can change a large number of global settings on your server. These changes affect all users of the machine, including yourself, resellers, and resellers' customers.

whm>>Stats and Logs

Keep Stats Log (/usr/local/cpanel/logs/stats_log) between cPanel restarts - Enables WebHost Manager to keep the statistics log when restarting the application.

Keep log files at the end of the month - Maintains old log files after the end of each month. If not ticked, log files are deleted after each month.

Number of days between processing log files and bandwidth usage - Enter the number of days between processing log files and bandwidth usage in the adjacent field. Decimal values are allowed.
 

jeff3

Member
Oct 3, 2006
5
0
151
This is a step in the right direction. However I already had the "Keep Stats Log" checked.
The file /usr/local/cpanel/logs/access_log is what I need.
The problem is after 7 days, the log entries in this file are deleted, and a new file is started.
I would like to keep the file from being deleted every 7 days.
Any idea where that setting is kept?

jeff
 

Anne

Member
Oct 4, 2006
9
0
151
Hi,
Logs should not delete weekly, For that you have make changes in /etc/logrorate.conf on
line no 6 rotate 4 change it to rotate 10.
 
Last edited:

angelina_holy

Well-Known Member
Aug 6, 2006
113
0
166
Try adding a logrotate

check at http://www.webhostgear.com/144.html


pico /etc/logrotate.conf

cPanel is not rotating its own logs either. Place this in the same file we have been editing:


/usr/local/cpanel/logs/access_log {
weekly
rotate 4 # will keep 4 weeks worth of backlogs
}
 

jeff3

Member
Oct 3, 2006
5
0
151
Unfortunately logrotate makes no mention of that directory.. That was why I posted to begin with. I figured cpanel had something that tried to rotate the logs, and it wasn't working correctly, so thought I would just set up logrotate.
My access_log is being cleaned every 7 days, and I have no idea why.