{"id":920,"date":"2021-07-23T12:41:16","date_gmt":"2021-07-23T12:41:16","guid":{"rendered":"https:\/\/ssdsunucum.com\/blog\/log-rotation\/"},"modified":"2021-07-23T12:41:16","modified_gmt":"2021-07-23T12:41:16","slug":"log-rotation","status":"publish","type":"post","link":"https:\/\/ssdsunucum.com\/blog\/log-rotation\/","title":{"rendered":"Log Rotation"},"content":{"rendered":"<\/p>\n<div class=\"col-md-9\">\n<div class=\"flex-column flex-md-row article-header\">\n<div id=\"versioned-article-header\">\n<p class=\"valid-version-info\"><em>Valid for versions 82 through the latest version<\/em><\/p>\n<\/div>\n<div id=\"version-select-group\" aria-label=\"select versions\">\n<h4>Version:<\/h4>\n<h4>82<\/h4>\n<\/div><\/div>\n<hr>\n<h2 id=\"overview\">Overview<\/h2>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n<p>This document discusses using <strong>Apache\u2019s <em>Log Rotation<\/em><\/strong> interface (<em>Home &gt;&gt; Service Configuration &gt;&gt; Apache Configuration &gt;&gt; Log Rotation<\/em>) to manage the rotation and archiving of Apache log files.<\/p>\n<p>For information about managing the rotation and archiving of <strong>WHM &#038; cPanel log files<\/strong>, read our cPanel Log Rotation Configuration interface (<em>Home &gt;&gt; Service Configuration &gt;&gt; cPanel Log Rotation Configuration<\/em>) documentation.<\/p>\n<\/p><\/div>\n<\/div>\n<p>This interface allows you to select Apache log files for the <code>cpanellogd<\/code> daemon to compress and archive. The <code>cpanellogd<\/code> daemon compresses the selected log files into a single file for each type.<\/p>\n<p>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 <em>Stats and Logs<\/em> section of WHM\u2019s <em>Tweak Settings<\/em> interface (<em>WHM &gt;&gt; Home &gt;&gt; Server Configuration &gt;&gt; Tweak Settings<\/em>).<\/p>\n<p>The system stores the compressed files in the <code>\/home\/username\/logs<\/code> directory, where username represents the name of the cPanel account. If you disable the <em>Archive logs in the user\u2019s home directory at the end of each stats run unless configured by the user<\/em> option in the <em>Stats and Logs<\/em> section of WHM\u2019s <em>Tweak Settings<\/em> interface (<em>WHM &gt;&gt; Home &gt;&gt; Server Configuration &gt;&gt; Tweak Settings<\/em>), the system will not store logs in each user\u2019s directory.<\/p>\n<div class=\"callout callout-warning\">\n<div class=\"callout-heading\">Important:<\/div>\n<div class=\"callout-content\">\n<p>The system does <strong>not<\/strong> automatically delete the compressed log files. You <strong>must<\/strong> manually delete any unnecessary files.<\/p>\n<\/p><\/div>\n<\/div>\n<h2 id=\"configure-log-files\">Configure log files<\/h2>\n<p>To select the log files that the <code>cpanellogd<\/code> daemon will archive, perform the following steps:<\/p>\n<ol>\n<li>\n<p>Select the appropriate checkboxes next to the log files that you wish to archive.<\/p>\n<ul>\n<li>\n<p><code>error_log<\/code> \u2014 This log file contains errors that Apache encounters when it tries to process a request.<\/p>\n<\/li>\n<li>\n<p><code>access_log<\/code> \u2014 This log file contains all requests that Apache processes.<\/p>\n<\/li>\n<li>\n<p><code>modsec_debug_log<\/code> \u2014 This log file contains errors that ModSecurity\u00ae encounters when it tries to block a request.<\/p>\n<\/li>\n<li>\n<p><code>suexec_log<\/code> \u2014 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.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Click <em>Save<\/em>.<\/p>\n<\/li>\n<\/ol>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n<p>For more information about log files that appear in this interface, read our The cPanel &#038; WHM Log Files documentation.<\/p>\n<\/p><\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Valid for versions 82 through the latest version Version: 82 Overview Note: This document discusses using Apache\u2019s Log Rotation interface (Home &gt;&gt; Service Configuration &gt;&gt; Apache Configuration &gt;&gt; Log Rotation) to manage the rotation and archiving of Apache log files. For information about managing the rotation and archiving of WHM &#038; cPanel log files, read &hellip;<\/p>\n","protected":false},"author":1,"featured_media":921,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/920"}],"collection":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/comments?post=920"}],"version-history":[{"count":0,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/920\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media\/921"}],"wp:attachment":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media?parent=920"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/categories?post=920"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/tags?post=920"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}