Skip to main content

Enable log rotation?

Comments

4 comments

  • rpvw
    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.
    0
  • cPanelMichael
    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.
    0
  • Tornado
    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 ?
    0
  • rpvw
    This thread might help you: Please help me setup a Cronjob to delete files older than 7days old Be very, very, VERY careful using any script that uses the "rm" command ..... if you get it wrong, at worst, you can wreck your system. At best, you may delete files you wanted to keep.
    0

Please sign in to leave a comment.