{"id":1561,"date":"2022-07-13T23:25:54","date_gmt":"2022-07-13T23:25:54","guid":{"rendered":"https:\/\/pheonixsolutions.com\/knowledge-base\/?p=1561"},"modified":"2022-07-13T23:33:16","modified_gmt":"2022-07-13T23:33:16","slug":"log-rotation-on-cpanel-servers","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/13\/log-rotation-on-cpanel-servers\/","title":{"rendered":"Log Rotation on cPanel Servers"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Introduction<\/h3>\n\n\n\n<p>Some cPanel Specific logs are rotated by a daemon called&nbsp;<code>cpanellogd<\/code>&nbsp;and are managed through WHM.<\/p>\n\n\n\n<p>Some cPanel related logs are rotated by the&nbsp;<code>logrotated<\/code>&nbsp;utility. The&nbsp;<code>logrotated<\/code>&nbsp;configuration of these logs is managed by cPanel and does not need to be modified manually.<\/p>\n\n\n\n<p><br>Any new or custom logs implemented on the server would require a custom&nbsp;<code>logrotated<\/code>&nbsp;configuration. The process of generating a custom log rotation configuration for your new log is a task that you&#8217;ll need to work on with a third party systems administrator.<\/p>\n\n\n\n<p>This guide provides information about how to manage log rotation on your cPanel server.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The cpanellogd Managed Log Rotation<\/h3>\n\n\n\n<p>The logs located under&nbsp;<code>\/usr\/local\/cpanel\/logs<\/code>&nbsp;are rotated by the cpanellogd daemon.<\/p>\n\n\n\n<p>You can enable and disable log rotation for these logs in WHM at:<\/p>\n\n\n\n<p><code>Home \u00bbService Configuration \u00bbcPanel Log Rotation Configuration<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">cPanel Specific logrotated Configurations<\/h3>\n\n\n\n<p>cPanel maintains the log rotation configurations for software such as PHP FPM, suPHP, etc in the following directory:<\/p>\n\n\n\n<p><code>\/etc\/logrotate.d\/<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">All Other Log Rotation<\/h3>\n\n\n\n<p>All other logs are also managed by the&nbsp;<code>logrotated<\/code>&nbsp;utility and should either have an entry in&nbsp;<code>\/etc\/logrotate.conf<\/code>, or a configuration file in&nbsp;<code>\/etc\/logrotate.d<\/code>.<\/p>\n\n\n\n<p>If you need to add a log rotate configuration for a log that is not already configured, you would need to use the following command to read the logrotated manual for the details:<\/p>\n\n\n\n<p><code>man logrotate<\/code><\/p>\n\n\n\n<p>However one way to quickly start&nbsp; out would be to copy an existing log rotation configuration and then customize it to match the file path of your custom log.<\/p>\n\n\n\n<p>The&nbsp;<code>logrotated<\/code>&nbsp;utility makes use of&nbsp;<code>anacron<\/code>, so your configuration will be used the next time&nbsp;<code>logrotated<\/code>&nbsp;is configured to run in:<\/p>\n\n\n\n<p><code>\/etc\/cron.daily\/logrotate<\/code><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Some cPanel Specific logs are rotated by a daemon called&nbsp;cpanellogd&nbsp;and are managed through WHM. Some cPanel related logs are rotated by the&nbsp;logrotated&nbsp;utility. The&nbsp;logrotated&nbsp;configuration of these logs is managed by cPanel and does not need to be modified manually. Any new or custom logs implemented on the server would require a custom&nbsp;logrotated&nbsp;configuration. The process of ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/13\/log-rotation-on-cpanel-servers\/\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[33],"tags":[5],"class_list":["post-1561","post","type-post","status-publish","format-standard","hentry","category-whm","tag-cpanel"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Log Rotation on cPanel Servers - PheonixSolutions Knowledge-Base<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/13\/log-rotation-on-cpanel-servers\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Log Rotation on cPanel Servers - PheonixSolutions Knowledge-Base\" \/>\n<meta property=\"og:description\" content=\"Introduction Some cPanel Specific logs are rotated by a daemon called&nbsp;cpanellogd&nbsp;and are managed through WHM. Some cPanel related logs are rotated by the&nbsp;logrotated&nbsp;utility. The&nbsp;logrotated&nbsp;configuration of these logs is managed by cPanel and does not need to be modified manually. Any new or custom logs implemented on the server would require a custom&nbsp;logrotated&nbsp;configuration. The process of ..Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/13\/log-rotation-on-cpanel-servers\/\" \/>\n<meta property=\"og:site_name\" content=\"PheonixSolutions Knowledge-Base\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-13T23:25:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-07-13T23:33:16+00:00\" \/>\n<meta name=\"author\" content=\"vijender\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"vijender\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/13\\\/log-rotation-on-cpanel-servers\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/13\\\/log-rotation-on-cpanel-servers\\\/\"},\"author\":{\"name\":\"vijender\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/7e483f3adf4e0c18f959adcaf9ea3f3d\"},\"headline\":\"Log Rotation on cPanel Servers\",\"datePublished\":\"2022-07-13T23:25:54+00:00\",\"dateModified\":\"2022-07-13T23:33:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/13\\\/log-rotation-on-cpanel-servers\\\/\"},\"wordCount\":280,\"commentCount\":0,\"keywords\":[\"cPanel\"],\"articleSection\":[\"WHM\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/13\\\/log-rotation-on-cpanel-servers\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/13\\\/log-rotation-on-cpanel-servers\\\/\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/13\\\/log-rotation-on-cpanel-servers\\\/\",\"name\":\"Log Rotation on cPanel Servers - PheonixSolutions Knowledge-Base\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#website\"},\"datePublished\":\"2022-07-13T23:25:54+00:00\",\"dateModified\":\"2022-07-13T23:33:16+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/7e483f3adf4e0c18f959adcaf9ea3f3d\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/13\\\/log-rotation-on-cpanel-servers\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/13\\\/log-rotation-on-cpanel-servers\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/13\\\/log-rotation-on-cpanel-servers\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Log Rotation on cPanel Servers\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#website\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/\",\"name\":\"PheonixSolutions Knowledge-Base\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/7e483f3adf4e0c18f959adcaf9ea3f3d\",\"name\":\"vijender\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/29c5aebbdf439bbeaeea52d1cf1a0166768889fd6238deb28b6851eebb2cfb32?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/29c5aebbdf439bbeaeea52d1cf1a0166768889fd6238deb28b6851eebb2cfb32?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/29c5aebbdf439bbeaeea52d1cf1a0166768889fd6238deb28b6851eebb2cfb32?s=96&d=mm&r=g\",\"caption\":\"vijender\"},\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/author\\\/vijender\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Log Rotation on cPanel Servers - PheonixSolutions Knowledge-Base","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/13\/log-rotation-on-cpanel-servers\/","og_locale":"en_US","og_type":"article","og_title":"Log Rotation on cPanel Servers - PheonixSolutions Knowledge-Base","og_description":"Introduction Some cPanel Specific logs are rotated by a daemon called&nbsp;cpanellogd&nbsp;and are managed through WHM. Some cPanel related logs are rotated by the&nbsp;logrotated&nbsp;utility. The&nbsp;logrotated&nbsp;configuration of these logs is managed by cPanel and does not need to be modified manually. Any new or custom logs implemented on the server would require a custom&nbsp;logrotated&nbsp;configuration. The process of ..Read more","og_url":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/13\/log-rotation-on-cpanel-servers\/","og_site_name":"PheonixSolutions Knowledge-Base","article_published_time":"2022-07-13T23:25:54+00:00","article_modified_time":"2022-07-13T23:33:16+00:00","author":"vijender","twitter_card":"summary_large_image","twitter_misc":{"Written by":"vijender","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/13\/log-rotation-on-cpanel-servers\/#article","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/13\/log-rotation-on-cpanel-servers\/"},"author":{"name":"vijender","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/7e483f3adf4e0c18f959adcaf9ea3f3d"},"headline":"Log Rotation on cPanel Servers","datePublished":"2022-07-13T23:25:54+00:00","dateModified":"2022-07-13T23:33:16+00:00","mainEntityOfPage":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/13\/log-rotation-on-cpanel-servers\/"},"wordCount":280,"commentCount":0,"keywords":["cPanel"],"articleSection":["WHM"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/13\/log-rotation-on-cpanel-servers\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/13\/log-rotation-on-cpanel-servers\/","url":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/13\/log-rotation-on-cpanel-servers\/","name":"Log Rotation on cPanel Servers - PheonixSolutions Knowledge-Base","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#website"},"datePublished":"2022-07-13T23:25:54+00:00","dateModified":"2022-07-13T23:33:16+00:00","author":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/7e483f3adf4e0c18f959adcaf9ea3f3d"},"breadcrumb":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/13\/log-rotation-on-cpanel-servers\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/13\/log-rotation-on-cpanel-servers\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/13\/log-rotation-on-cpanel-servers\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/pheonixsolutions.com\/knowledge-base\/"},{"@type":"ListItem","position":2,"name":"Log Rotation on cPanel Servers"}]},{"@type":"WebSite","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#website","url":"https:\/\/pheonixsolutions.com\/knowledge-base\/","name":"PheonixSolutions Knowledge-Base","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/pheonixsolutions.com\/knowledge-base\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/7e483f3adf4e0c18f959adcaf9ea3f3d","name":"vijender","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/29c5aebbdf439bbeaeea52d1cf1a0166768889fd6238deb28b6851eebb2cfb32?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/29c5aebbdf439bbeaeea52d1cf1a0166768889fd6238deb28b6851eebb2cfb32?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/29c5aebbdf439bbeaeea52d1cf1a0166768889fd6238deb28b6851eebb2cfb32?s=96&d=mm&r=g","caption":"vijender"},"url":"https:\/\/pheonixsolutions.com\/knowledge-base\/author\/vijender\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/1561","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/comments?post=1561"}],"version-history":[{"count":2,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/1561\/revisions"}],"predecessor-version":[{"id":1563,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/1561\/revisions\/1563"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/media?parent=1561"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/categories?post=1561"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/tags?post=1561"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}