{"id":4046,"date":"2017-03-30T16:28:45","date_gmt":"2017-03-30T16:28:45","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2017\/03\/30\/awstats-with-varnish-all-domains\/"},"modified":"2023-06-07T09:49:56","modified_gmt":"2023-06-07T13:49:56","slug":"awstats-with-varnish-all-domains","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/domain-names\/awstats-with-varnish-all-domains\/","title":{"rendered":"Fix AWStats Reports With Varnish 4 For All Domains"},"content":{"rendered":"<p>Varnish is a caching system that has the ability to speed up your server\u2019s ability to display webpages. Varnish sits between the Internet &amp; your other software. This means that AWStats is unable to report on your traffic. This article will outline one option for fixing this problem with Varnish 4.<\/p>\n<p class=\"alert\">NOTE: Varnish does not handle HTTPS traffic. This means that after following these instructions AWStats will only show non-HTTPS data.<\/p>\n<p><a name=\"prerequisites\"><\/a><\/p>\n<h2 id=\"first-heading\">Prerequisites<\/h2>\n<p>This article assumes a few points that will need to be complete or in place before proceeding. They are:<\/p>\n<ul>\n<li>CentOS 6 or 7 server<\/li>\n<li>cPanel version 62.0 (build 17) or similar installed, and operating as normal<\/li>\n<li>Varnish 4 installed, and operating as normal<\/li>\n<\/ul>\n<h2>Ok, I Have All Those Installed &amp; Operating as Normal. What now?<\/h2>\n<ol class=\"article_list\">\n<li><a href=\"\/support\/server\/ssh\/how-to-login-ssh\/\">Log into your server via SSH<\/a> as <span class=\"italic\">root<\/span><\/li>\n<li>Start the Varnish logging utility that outputs in Apache log format. For <span class=\"italic\">CentOS 6<\/span> run\n<p class=\"strong code_block\">service varnishncsa start<\/p>\n<p>For <span class=\"italic\">Centos 7<\/span> run<\/p>\n<p class=\"strong code_block\">systemctl start varnishncsa<\/p>\n<\/li>\n<li>Set <span class=\"italic\">varnishncsa<\/span> to start if you server restarts\n<p class=\"strong code_block\">chkconfig varnishncsa on<\/p>\n<\/li>\n<li><a href=\"\/support\/images\/stories\/awstats\/AWStatsConfigFile_LogFileEdit.png\" rel=\"lightbox-0\"><img decoding=\"async\" class=\"std_ss\" style=\"float: right; margin: 0px 15px 15px 15px; width: 200px;\" src=\"\/support\/images\/stories\/awstats\/AWStatsConfigFile_LogFileEdit.png\" alt=\"AWStats Config File\"><\/a>\n<div style=\"clear: both;\"><\/div>\n<p>Update <span class=\"italic\">LogFile<\/span> variable in the AWStats configuration file with the new log location <span class=\"italic\">\/var\/log\/varnish\/varnishncsa.log<\/span>. By default this is in the \u2018awstats\u2019 folder inside the \u2018tmp\u2019 folder of your cPanel user\u2019s home directory. The full path for this file usually looks something like <span class=\"strong\">\/home\/userna05\/tmp\/awstats\/awstats.primarydomain.com.conf<\/span><\/p>\n<div style=\"clear: both;\"><\/div>\n<\/li>\n<li>Change permissions for this file to prevent cPanel from overwriting these changes. Be sure to replace \u2018userna05\u2019 with your primary cPanel user name, and \u2018primarydomain.com\u2019 with your primary domain.\n<p class=\"strong code_block\">chmod 444 \/home\/userna05\/tmp\/awstats\/awstats.primarydomain.com.conf<\/p>\n<\/li>\n<li><a href=\"\/support\/edu\/cpanel\/how-to-log-into-cpanel\/\">Log into cPanel<\/a> for your primary cPanel user.<\/li>\n<li><a href=\"\/support\/images\/stories\/cpanel\/awstats\/AWStatsIcon_highlight.png\" rel=\"lightbox-0\"><img decoding=\"async\" class=\"std_ss\" style=\"float: right; margin: 0px 15px 15px 15px; width: 200px;\" src=\"\/support\/images\/stories\/cpanel\/awstats\/AWStatsIcon_highlight.png\" alt=\"AWStats Icon\"><\/a>\n<div style=\"clear: both;\"><\/div>\n<p>Access <span class=\"strong\">AWStats<\/span><\/p>\n<div style=\"clear: both;\"><\/div>\n<\/li>\n<li><a href=\"\/support\/images\/stories\/cpanel\/awstats\/cPanel-awstats-view-link-highlight.jpg\" rel=\"lightbox-0\"><img decoding=\"async\" class=\"std_ss\" style=\"float: right; margin: 0px 15px 15px 15px; width: 200px;\" src=\"\/support\/images\/stories\/cpanel\/awstats\/cPanel-awstats-view-link-highlight.jpg\" alt=\"find primary domain\"><\/a>\n<div style=\"clear: both;\"><\/div>\n<p>Find your <span class=\"italic\">primary domain<\/span> on the list of available domains, and click <span class=\"strong\">View<\/span> next to it<\/p>\n<div style=\"clear: both;\"><\/div>\n<\/li>\n<li><a href=\"\/support\/images\/stories\/cpanel\/awstats\/AWStatsReport_updateNowHighlight.png\" rel=\"lightbox-0\"><img decoding=\"async\" class=\"std_ss\" style=\"float: right; margin: 0px 15px 15px 15px; width: 200px;\" src=\"\/support\/images\/stories\/cpanel\/awstats\/AWStatsReport_updateNowHighlight.png\" alt=\"click update\"><\/a>\n<div style=\"clear: both;\"><\/div>\n<p>Finally, click <span class=\"strong\">Update now<\/span> at the top of the page.<\/p>\n<div style=\"clear: both;\"><\/div>\n<\/li>\n<\/ol>\n<p>Congratulations! You are now allowing AWStats to parse data from Varnish for all domains on your server.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Varnish is a caching system that has the ability to speed up your server\u2019s ability to display webpages. Varnish sits between the Internet &amp; your other software. This means that AWStats is unable to report on your traffic. This article will outline one option for fixing this problem with Varnish 4. NOTE: Varnish does not<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/awstats-with-varnish-all-domains\/\"> 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":[6],"tags":[],"class_list":["post-4046","post","type-post","status-publish","format-standard","hentry","category-domain-names"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Fix AWStats Reports With Varnish 4 For All Domains<\/title>\n<meta name=\"description\" content=\"This article outlines one option for fixing AWStats reporting with Varnish 4.\" \/>\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\/domain-names\/awstats-with-varnish-all-domains\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Fix AWStats Reports With Varnish 4 For All Domains\" \/>\n<meta property=\"og:description\" content=\"This article outlines one option for fixing AWStats reporting with Varnish 4.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/awstats-with-varnish-all-domains\/\" \/>\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=\"2017-03-30T16:28:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-06-07T13:49:56+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=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/awstats-with-varnish-all-domains\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/awstats-with-varnish-all-domains\/\"},\"author\":{\"name\":\"InMotion Hosting Contributor\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644\"},\"headline\":\"Fix AWStats Reports With Varnish 4 For All Domains\",\"datePublished\":\"2017-03-30T16:28:45+00:00\",\"dateModified\":\"2023-06-07T13:49:56+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/awstats-with-varnish-all-domains\/\"},\"wordCount\":319,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"articleSection\":[\"Domain Names\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/awstats-with-varnish-all-domains\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/awstats-with-varnish-all-domains\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/awstats-with-varnish-all-domains\/\",\"name\":\"How to Fix AWStats Reports With Varnish 4 For All Domains\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"datePublished\":\"2017-03-30T16:28:45+00:00\",\"dateModified\":\"2023-06-07T13:49:56+00:00\",\"description\":\"This article outlines one option for fixing AWStats reporting with Varnish 4.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/awstats-with-varnish-all-domains\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/awstats-with-varnish-all-domains\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/domain-names\/awstats-with-varnish-all-domains\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Fix AWStats Reports With Varnish 4 For All Domains\"}]},{\"@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":"How to Fix AWStats Reports With Varnish 4 For All Domains","description":"This article outlines one option for fixing AWStats reporting with Varnish 4.","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\/domain-names\/awstats-with-varnish-all-domains\/","og_locale":"en_US","og_type":"article","og_title":"How to Fix AWStats Reports With Varnish 4 For All Domains","og_description":"This article outlines one option for fixing AWStats reporting with Varnish 4.","og_url":"https:\/\/www.inmotionhosting.com\/support\/domain-names\/awstats-with-varnish-all-domains\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2017-03-30T16:28:45+00:00","article_modified_time":"2023-06-07T13:49:56+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":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/domain-names\/awstats-with-varnish-all-domains\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/domain-names\/awstats-with-varnish-all-domains\/"},"author":{"name":"InMotion Hosting Contributor","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644"},"headline":"Fix AWStats Reports With Varnish 4 For All Domains","datePublished":"2017-03-30T16:28:45+00:00","dateModified":"2023-06-07T13:49:56+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/domain-names\/awstats-with-varnish-all-domains\/"},"wordCount":319,"commentCount":0,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"articleSection":["Domain Names"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/domain-names\/awstats-with-varnish-all-domains\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/domain-names\/awstats-with-varnish-all-domains\/","url":"https:\/\/www.inmotionhosting.com\/support\/domain-names\/awstats-with-varnish-all-domains\/","name":"How to Fix AWStats Reports With Varnish 4 For All Domains","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"datePublished":"2017-03-30T16:28:45+00:00","dateModified":"2023-06-07T13:49:56+00:00","description":"This article outlines one option for fixing AWStats reporting with Varnish 4.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/domain-names\/awstats-with-varnish-all-domains\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/domain-names\/awstats-with-varnish-all-domains\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/domain-names\/awstats-with-varnish-all-domains\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"Fix AWStats Reports With Varnish 4 For All Domains"}]},{"@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\/4046","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=4046"}],"version-history":[{"count":8,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/4046\/revisions"}],"predecessor-version":[{"id":104762,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/4046\/revisions\/104762"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=4046"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=4046"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=4046"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}