Valid for versions 82 through the latest version
Last modified: December 2, 2020
This document discusses using Apache’s Log Rotation interface (Home >> Service Configuration >> Apache Configuration >> Log Rotation) to manage the rotation and archiving of Apache log files.
For information about managing the rotation and archiving of WHM & cPanel log files, read our cPanel Log Rotation Configuration interface (Home >> Service Configuration >> cPanel Log Rotation Configuration) documentation.
This interface allows you to select Apache log files for the
cpanellogd daemon to compress and archive. The
cpanellogd daemon compresses the selected log files into a single file for each type.
Archiving happens either when the log file grows larger than the log rotation size threshold or at the end of the month. The default log rotation size threshold is 300 MB. You can change it in the Stats and Logs section of WHM’s Tweak Settings interface (WHM >> Home >> Server Configuration >> Tweak Settings).
The system stores the compressed files in the
/home/username/logs directory, where username represents the name of the cPanel account. If you disable the Archive logs in the user’s home directory at the end of each stats run unless configured by the user option in the Stats and Logs section of WHM’s Tweak Settings interface (WHM >> Home >> Server Configuration >> Tweak Settings), the system will not store logs in each user’s directory.
The system does not automatically delete the compressed log files. You must manually delete any unnecessary files.
Configure log files
To select the log files that the
cpanellogd daemon will archive, perform the following steps:
Select the appropriate checkboxes next to the log files that you wish to archive.
error_log— This log file contains errors that Apache encounters when it tries to process a request.
access_log— This log file contains all requests that Apache processes.
modsec_debug_log— This log file contains errors that ModSecurity® encounters when it tries to block a request.
suexec_log— This file contains information about suEXEC audit logs. This is useful, for example, to diagnose internal server errors that do not produce relevant information in the error log.
For more information about log files that appear in this interface, read our The cPanel & WHM Log Files documentation.