{"id":141,"date":"2010-05-19T16:09:13","date_gmt":"2010-05-19T12:09:13","guid":{"rendered":"http:\/\/gistlabs.net\/weblogs\/?p=141"},"modified":"2012-12-07T12:40:37","modified_gmt":"2012-12-07T08:40:37","slug":"setting-up-awstats-in-ubuntu","status":"publish","type":"post","link":"https:\/\/www.gistlabs.net\/weblogs\/setting-up-awstats-in-ubuntu\/","title":{"rendered":"Setting up awstats in ubuntu"},"content":{"rendered":"<p>#  Install awstats package<br \/>\nsudo apt-get install awstats<br \/>\n# Edit a file called \/etc\/awstats\/awstats.hostname.conf where hostname is the hostname. Put something like this in it:<\/p>\n<p>LogFile=&#8221;\/var\/log\/apache2\/access.log&#8221;<br \/>\nLogFormat=1<br \/>\nDNSLookup=1<br \/>\nDirData=&#8221;\/var\/cache\/awstats\/&#8221;<br \/>\nDirCgi=&#8221;\/cgi-bin&#8221;<br \/>\nDirIcons=&#8221;\/icon&#8221;<br \/>\nSiteDomain=&#8221;hostname&#8221;<br \/>\nAllowToUpdateStatsFromBrowser=1<br \/>\nAllowFullYearView=3<\/p>\n<p># Make a directory called \/var\/cache\/awstats and chmod it 777 so it can be used from the web server<br \/>\n# Copy icons to web directory:<\/p>\n<p>cp -r \/usr\/share\/awstats\/icon \/var\/www\/icon<\/p>\n<p># Run this to update databases:<\/p>\n<p>\/usr\/lib\/cgi-bin\/awstats.pl -config=hostname -update<\/p>\n<p># In your web browser, go to the url:<\/p>\n<p>http:\/\/hostname\/cgi-bin\/awstats.pl?config=hostname<\/p>\n<p># Study the stats in quiet awe<br \/>\n# Edit crontab to update stats automatically every night:<\/p>\n<p>crontab -e<br \/>\n0 1 * * * \/usr\/lib\/cgi-bin\/awstats.pl -config=hostname -update<\/p>\n<p>Thanks to <a href=\"http:\/\/www.petersblog.org\/node\/697  \">http:\/\/www.petersblog.org\/node\/697  <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p># Install awstats package sudo apt-get install awstats # Edit a file called \/etc\/awstats\/awstats.hostname.conf where hostname is the hostname. Put something like this in it: LogFile=&#8221;\/var\/log\/apache2\/access.log&#8221; LogFormat=1 DNSLookup=1 DirData=&#8221;\/var\/cache\/awstats\/&#8221; DirCgi=&#8221;\/cgi-bin&#8221; DirIcons=&#8221;\/icon&#8221; SiteDomain=&#8221;hostname&#8221; AllowToUpdateStatsFromBrowser=1 AllowFullYearView=3 # Make a directory called \/var\/cache\/awstats and chmod it 777 so it can be used from the web server # Copy &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"https:\/\/www.gistlabs.net\/weblogs\/setting-up-awstats-in-ubuntu\/\">Continue reading<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[176,174,175],"class_list":["post-141","post","type-post","status-publish","format-standard","hentry","category-unix","tag-apache","tag-awstats","tag-ubuntu","item-wrap"],"_links":{"self":[{"href":"https:\/\/www.gistlabs.net\/weblogs\/wp-json\/wp\/v2\/posts\/141","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gistlabs.net\/weblogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gistlabs.net\/weblogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gistlabs.net\/weblogs\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gistlabs.net\/weblogs\/wp-json\/wp\/v2\/comments?post=141"}],"version-history":[{"count":1,"href":"https:\/\/www.gistlabs.net\/weblogs\/wp-json\/wp\/v2\/posts\/141\/revisions"}],"predecessor-version":[{"id":799,"href":"https:\/\/www.gistlabs.net\/weblogs\/wp-json\/wp\/v2\/posts\/141\/revisions\/799"}],"wp:attachment":[{"href":"https:\/\/www.gistlabs.net\/weblogs\/wp-json\/wp\/v2\/media?parent=141"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gistlabs.net\/weblogs\/wp-json\/wp\/v2\/categories?post=141"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gistlabs.net\/weblogs\/wp-json\/wp\/v2\/tags?post=141"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}