BuycPanel Blog

BuycPanel Blog

Latest news and updates

Can we Compress and Archive Apache Log Files to Save Disk Space?

Posted by Allura on 14 03 2019.

Introduction
One needs to navigate to (WHM >> Home >> Service Configuration >> Apache Configuration) to work on this feature. It allows one to select Apache log files for the cpanellogd daemon so as to compress and archive. The cpanellogd daemon compresses the selected log files into a single file for each type at the end of each month.The compressed files are stored by the system in the /home/username/logs directory, username representing the name of the cPanel account.In case the Archive logs in the user’s home directory is disabled 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 be storing logs in each user’s directory.However, the system does not delete the compressed log files all by itself. One needs to delete any kind…

Introduction

One needs to navigate to (WHM >> Home >> Service Configuration >> Apache Configuration) to work on this feature. It allows one to select Apache log files for the cpanellogd daemon so as to compress and archive. The cpanellogd daemon compresses the selected log files into a single file for each type at the end of each month.

The compressed files are stored by the system in the /home/username/logs directory, username representing the name of the cPanel account.

In case the Archive logs in the user’s home directory is disabled 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 be storing logs in each user’s directory.

However, the system does not delete the compressed log files all by itself. One needs to delete any kind of unnecessary files manually.

Configure Log Files

Steps:

  1. Firstly one needs to select the appropriate checkboxes next to the log files that one wishes to archive.
  • error_log — It contains errors that Apache encounters when trying to process a request.
  • access_log — It contains all requests that Apache processes.
  • modsec_debug_log — It contains errors that ModSecurity™ encounters when trying to block a request.
  1. Then one can click on Save.

To gather more information about any additional log files appearing in the interface, one can read ‘The cPanel Log Files’ documentation.

Conclusion

This feature helps a user in various ways as outlined in the review.