Tornado

Active Member
Jul 17, 2007
43
1
58
Iran
Hi
every month we should remove manually some logs which consuming lots space...
for example:

/var/log/apache2/archive

1.4G error_log-07-2017.gz
9.5G error_log-08-2017.gz
212M error_log-09-2017.gz


how i can disable rotate apache logs ?
 

rpvw

Well-Known Member
Jul 18, 2013
1,101
465
113
UK
cPanel Access Level
Root Administrator
Log file rotation is configured in WHM Home » Service Configuration » cPanel Log Rotation Configuration
cPanel Log Rotation Configuration
Files from /usr/local/cpanel/logs selected below will be rotated based upon their size. The rotated files will be compressed and stored in /usr/local/cpanel/logs/archive/. The files are named to include the month in which they are rotated. Consequently, the file names do not relate in any way to the content of the file being rotated. Files are only rotated when they grow larger than the WHM >> Tweak Settings >> Log Rotation Size Threshold or the default of 300MB. The archived log files are left in place indefinitely. Files not chosen here will not ever be rotated by cPanel software.
If you have logs building up in other locations, I would first try and ascertain why they might not be under the cPanel log rotation control, and what is controlling them. I do, however, find it strange that you want to disable rotation for files that are causing you issues.
 
  • Like
Reactions: Tornado

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello,

The archived log files are left in place indefinitely, but you could setup a cron job to manually remove the log archives from the "/var/log/apache2/archive" directory.

Thank you.
 
  • Like
Reactions: Tornado

Tornado

Active Member
Jul 17, 2007
43
1
58
Iran
Hello,

The archived log files are left in place indefinitely, but you could setup a cron job to manually remove the log archives from the "/var/log/apache2/archive" directory.

Thank you.
Hi
Thank you
could you please provide us the cron job command to remove archives fro /var/log/apache2/archive ?
 

rpvw

Well-Known Member
Jul 18, 2013
1,101
465
113
UK
cPanel Access Level
Root Administrator