{"id":558,"date":"2013-02-07T21:06:04","date_gmt":"2013-02-08T02:06:04","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2013\/02\/07\/enable-raw-access-log-archiving-for-all-cpanel-accounts\/"},"modified":"2021-08-16T23:21:39","modified_gmt":"2021-08-17T03:21:39","slug":"enable-raw-access-log-archiving-for-all-cpanel-accounts","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/enable-raw-access-log-archiving-for-all-cpanel-accounts\/","title":{"rendered":"Enable raw access log archiving for all cPanel accounts"},"content":{"rendered":"<p>In this article I&#8217;ll quickly show you how to enable raw access log archiving for all cPanel accounts on your VPS (Virtual Private Server) or dedicated server all at once. Raw access logs contain the request data directly from the Apache web service that all of your website have been fulfulling.<\/p>\n<p>Without raw access logs, the only data you have to go off of for website requests is provided by one of the web statistics programs on the server, either Awstats, Logaholic, or Webalizer into compiled reports. Unfortunately those reports don&#8217;t show a lot of helpful information that can help you track down problematic requests that could be causing problems on your server.<\/p>\n<p>I wrote a previous article about <a href=\"\/support\/edu\/cpanel\/enable-raw-access-logs-in-cpanel\/\" target=\"_blank\" rel=\"noopener noreferrer\">enabling raw access log archiving in cPanel<\/a>&nbsp;that walks you through how you can enable archiving of your raw access logs by logging into cPanel for just one account. We also have another article on <a href=\"\/support\/edu\/cpanel\/accessing-the-raw-access-logs-in-cpanel\/\" target=\"_blank\" rel=\"noopener noreferrer\">accessing the raw access logs in cPanel<\/a>&nbsp;showing how to retreive the raw access logs by downloading them to your local machine.<\/p>\n<p>In this article I&#8217;m going to walk you through an easy way to enable raw access log archiving for every single cPanel user on your server at once. That way if you have any <a href=\"\/support\/\" target=\"_blank\" rel=\"noopener noreferrer\">server usage<\/a> problems that pop up at some point, you&#8217;ll have the logs you need to go back and investigate what might have possibly led to the issues.<\/p>\n<p class=\"alert\">Please note that to follow the steps below you&#8217;ll need <a href=\"\/support\/server\/ssh\/root-access-faq\/\" target=\"_blank\" rel=\"noopener noreferrer\">root access<\/a> to either your VPS or dedicated server so that you can access every cPanel account at once.<\/p>\n<h2>Enabling raw access logs archiving<\/h2>\n<p>I&#8217;m going to show you how to write out a cPanel configuration file that controls the raw access log archive settings, and then copy that to every cPanel user so that all of their logs are archived.<\/p>\n<ol class=\"article_list\">\n<li><a href=\"\/support\/server\/ssh\/how-to-login-ssh\/\" target=\"\u201d_blank\u201d\" rel=\"noopener noreferrer\">Login to your server via SSH<\/a> as the root user.<\/li>\n<li>Run the following command to enable raw access logs archiving:\n<p><code>echo archive-logs=1 &gt; \/root\/.cpanel-logs<\/code><br \/>\nIf you&#8217;d like to remove old archived logs, so that you&#8217;re only keeping a month worth of archived logs, also run this command:<\/p>\n<p><code>echo remove-old-archived-logs=1 &gt;&gt; \/root\/.cpanel-logs<\/code><\/li>\n<li>Now you can run the following loop to write out the raw access log archive settings to each cPanel user on the server:\n<p><code>for user in `\/bin\/ls -1 \/var\/cpanel\/users`;<br \/>\ndo cp -frp \/root\/.cpanel-logs \/home\/$user\/;<br \/>\nchown $user.$user \/home\/$user\/.cpanel-logs; chmod 640 \/home\/$user\/.cpanel-logs; done<\/code><\/li>\n<\/ol>\n<p>That should be all that you need to do in order to setup raw access log archiving for all of your cPanel users. Now if your server&#8217;s usage spikes again you&#8217;ll have logs to review for a possible explanation as to why.<\/p>\n<p>You can read my guide on <a href=\"\/support\/edu\/cpanel\/parse-archived-raw-access-logs-from-cpanel\/\" target=\"_blank\" rel=\"noopener noreferrer\">how to parse archived raw access logs from cPanel<\/a>, for an in-depth review on how you can review all of the requests being stored in your archived raw access logs.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article I&#8217;ll quickly show you how to enable raw access log archiving for all cPanel accounts on your VPS (Virtual Private Server) or dedicated server all at once. Raw access logs contain the request data directly from the Apache web service that all of your website have been fulfulling. Without raw access logs,<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/enable-raw-access-log-archiving-for-all-cpanel-accounts\/\"> Read More ><\/a><\/p>\n","protected":false},"author":57014,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[51],"tags":[],"class_list":["post-558","post","type-post","status-publish","format-standard","hentry","category-cpanel"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Enable raw access log archiving for all cPanel accounts | InMotion Hosting<\/title>\n<meta name=\"description\" content=\"In this article I&#039;ll quickly show you how to enable raw access log archiving for all cPanel accounts on your VPS (Virtual Private Server) or dedicated server all at once. Raw access logs contain the request data directly from the Apache web service that all of your website have been fulfulling.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/enable-raw-access-log-archiving-for-all-cpanel-accounts\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Enable raw access log archiving for all cPanel accounts | InMotion Hosting\" \/>\n<meta property=\"og:description\" content=\"In this article I&#039;ll quickly show you how to enable raw access log archiving for all cPanel accounts on your VPS (Virtual Private Server) or dedicated server all at once. Raw access logs contain the request data directly from the Apache web service that all of your website have been fulfulling.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/enable-raw-access-log-archiving-for-all-cpanel-accounts\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2013-02-08T02:06:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-17T03:21:39+00:00\" \/>\n<meta name=\"author\" content=\"InMotion Hosting Contributor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"InMotion Hosting Contributor\" \/>\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:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/enable-raw-access-log-archiving-for-all-cpanel-accounts\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/enable-raw-access-log-archiving-for-all-cpanel-accounts\/\"},\"author\":{\"name\":\"InMotion Hosting Contributor\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644\"},\"headline\":\"Enable raw access log archiving for all cPanel accounts\",\"datePublished\":\"2013-02-08T02:06:04+00:00\",\"dateModified\":\"2021-08-17T03:21:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/enable-raw-access-log-archiving-for-all-cpanel-accounts\/\"},\"wordCount\":474,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"articleSection\":[\"cPanel\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/enable-raw-access-log-archiving-for-all-cpanel-accounts\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/enable-raw-access-log-archiving-for-all-cpanel-accounts\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/enable-raw-access-log-archiving-for-all-cpanel-accounts\/\",\"name\":\"Enable raw access log archiving for all cPanel accounts | InMotion Hosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"datePublished\":\"2013-02-08T02:06:04+00:00\",\"dateModified\":\"2021-08-17T03:21:39+00:00\",\"description\":\"In this article I'll quickly show you how to enable raw access log archiving for all cPanel accounts on your VPS (Virtual Private Server) or dedicated server all at once. Raw access logs contain the request data directly from the Apache web service that all of your website have been fulfulling.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/enable-raw-access-log-archiving-for-all-cpanel-accounts\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/enable-raw-access-log-archiving-for-all-cpanel-accounts\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/enable-raw-access-log-archiving-for-all-cpanel-accounts\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Enable raw access log archiving for all cPanel accounts\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644\",\"name\":\"InMotion Hosting Contributor\",\"description\":\"InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!\",\"sameAs\":[\"https:\/\/www.linkedin.com\/company\/inmotion-hosting\/\",\"https:\/\/x.com\/https:\/\/twitter.com\/InMotionHosting\"],\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/inmotion-hosting-contributor\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Enable raw access log archiving for all cPanel accounts | InMotion Hosting","description":"In this article I'll quickly show you how to enable raw access log archiving for all cPanel accounts on your VPS (Virtual Private Server) or dedicated server all at once. Raw access logs contain the request data directly from the Apache web service that all of your website have been fulfulling.","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:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/enable-raw-access-log-archiving-for-all-cpanel-accounts\/","og_locale":"en_US","og_type":"article","og_title":"Enable raw access log archiving for all cPanel accounts | InMotion Hosting","og_description":"In this article I'll quickly show you how to enable raw access log archiving for all cPanel accounts on your VPS (Virtual Private Server) or dedicated server all at once. Raw access logs contain the request data directly from the Apache web service that all of your website have been fulfulling.","og_url":"https:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/enable-raw-access-log-archiving-for-all-cpanel-accounts\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2013-02-08T02:06:04+00:00","article_modified_time":"2021-08-17T03:21:39+00:00","author":"InMotion Hosting Contributor","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"InMotion Hosting Contributor","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/enable-raw-access-log-archiving-for-all-cpanel-accounts\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/enable-raw-access-log-archiving-for-all-cpanel-accounts\/"},"author":{"name":"InMotion Hosting Contributor","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644"},"headline":"Enable raw access log archiving for all cPanel accounts","datePublished":"2013-02-08T02:06:04+00:00","dateModified":"2021-08-17T03:21:39+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/enable-raw-access-log-archiving-for-all-cpanel-accounts\/"},"wordCount":474,"commentCount":0,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"articleSection":["cPanel"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/enable-raw-access-log-archiving-for-all-cpanel-accounts\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/enable-raw-access-log-archiving-for-all-cpanel-accounts\/","url":"https:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/enable-raw-access-log-archiving-for-all-cpanel-accounts\/","name":"Enable raw access log archiving for all cPanel accounts | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"datePublished":"2013-02-08T02:06:04+00:00","dateModified":"2021-08-17T03:21:39+00:00","description":"In this article I'll quickly show you how to enable raw access log archiving for all cPanel accounts on your VPS (Virtual Private Server) or dedicated server all at once. Raw access logs contain the request data directly from the Apache web service that all of your website have been fulfulling.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/enable-raw-access-log-archiving-for-all-cpanel-accounts\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/enable-raw-access-log-archiving-for-all-cpanel-accounts\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/enable-raw-access-log-archiving-for-all-cpanel-accounts\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"Enable raw access log archiving for all cPanel accounts"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644","name":"InMotion Hosting Contributor","description":"InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!","sameAs":["https:\/\/www.linkedin.com\/company\/inmotion-hosting\/","https:\/\/x.com\/https:\/\/twitter.com\/InMotionHosting"],"url":"https:\/\/www.inmotionhosting.com\/support\/author\/inmotion-hosting-contributor\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":null,"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/558","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/57014"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=558"}],"version-history":[{"count":4,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/558\/revisions"}],"predecessor-version":[{"id":84972,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/558\/revisions\/84972"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=558"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=558"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=558"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}