<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>Jim&#039;s New World &#187; betterawstats</title> <atom:link href="http://www.theczechs.net/blog/tag/betterawstats/feed/" rel="self" type="application/rss+xml" /><link>http://www.theczechs.net/blog</link> <description>Just another place to ramble on about nothing...</description> <lastBuildDate>Tue, 08 Nov 2011 20:26:22 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=</generator> <xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" /> <item><title>AWStats on Leopard Server</title><link>http://www.theczechs.net/blog/ramblings/awstats-on-leopard-server/</link> <comments>http://www.theczechs.net/blog/ramblings/awstats-on-leopard-server/#comments</comments> <pubDate>Tue, 08 Sep 2009 01:24:59 +0000</pubDate> <dc:creator>Jim</dc:creator> <category><![CDATA[Ramblings]]></category> <category><![CDATA[Apache 2]]></category> <category><![CDATA[AWStats]]></category> <category><![CDATA[betterawstats]]></category> <category><![CDATA[calibre]]></category> <category><![CDATA[Galen Sprague]]></category> <category><![CDATA[Kovid Goyal]]></category> <category><![CDATA[Leopard Server]]></category> <category><![CDATA[Lingon]]></category> <category><![CDATA[log files]]></category> <category><![CDATA[OS X]]></category> <category><![CDATA[Perl]]></category> <category><![CDATA[statistics]]></category> <guid
isPermaLink="false">http://www.theczechs.net/blog/?p=529</guid> <description><![CDATA[So I set about to install the AWStats tool. Downloading the archive from Sourceforge was the easy part. I then set about trying find specific instructions for my Leopard Server. That's when the fun began, and Google got a good workout. Thanks to Galen Sprague's blog, it got me headed in the right direction. But a few tweaks were still in order.]]></description> <content:encoded><![CDATA[<p>I stumbled upon a pretty cool web site stats page while searching for &#8220;<a
title="calibre by Kovid Goyal" href="http://calibre.kovidgoyal.net/" target="_blank">calibre</a>&#8221; developed by Kovid Goyal to gather news feeds for my Kindle (as well as many other ebook devices.)  This is a super app, but not the reason for this post.</p><p>The <a
title="calibre" href="http://calibre.kovidgoyal.net/" target="_blank">main &#8220;calibre&#8221; page</a> has a &#8220;<a
title="calibre web statistics" href="http://calibre.kovidgoyal.net/awstats/awstats.pl?config=calibre.kovidgoyal.net" target="_blank">Website usage statistics</a>&#8221; link.  I followed that and was intrigued.  This reminded me of a statistics page (I don&#8217;t remember the software) from my old Windows 2000 server (may it RIP) and got me looking for a way to incorporate on my OS X Server.</p><p>So I set about to install the tool.  Downloading the archive from <a
title="AWStats" href="http://awstats.sourceforge.net/" target="_blank">AWStats</a> was the easy part.  I then set about trying find specific instructions for my Leopard Server installation.  The first attempt, through <a
title="DarwinPorts" href="http://darwinports.com/" target="_blank">DarwinPorts</a> (<a
title="MacPorts" href="http://www.macports.org/">MacPorts</a>) failed when it was looking for a dependency on Apache 2.  Hold on!  I know Apple&#8217;s config is slightly less than generic, but I decided not to continue this route and really screw something up.</p><p>I searched for &#8216;manual instructions&#8217; and came upon <a
title="Galen Sprague's blog" href="http://blog.galensprague.com/?p=1" target="_blank">Galen Sprague&#8217;s blog</a>.  This looked to be just what I needed.  But, while it got me started well along in the right direction, the step by step didn&#8217;t work in my case.</p><p>I certainly can&#8217;t blame Galen, for I fear I have probably more than likely in my ignorance and bliss severely misconfigured my Server over time.  Sure, it works but when I run across these &#8216;simple&#8217; things, they just never quite seem to work.  &#8220;Stuff&#8221; isn&#8217;t found in the paths shown, commands don&#8217;t quite run as listed, etc., etc.</p><p>But today I was on a mission.  I felt I was really close, but didn&#8217;t quite know where or how to proceed.  More searching didn&#8217;t reveal any better information than Galen&#8217;s blog post.</p><p>After checking and rechecking, and hacking around, I finally got a page to display, albeit with no data.  Continued to scrub the logs, and make tweaks here and there.  Along the way, I tried the following:</p><ul><li>Set permissions to the awstats and betterawstats directories to www:www</li><li>Rechecked the conf files</li><li>Scrubbed the logs</li><li>Rechecked the conf files</li><li>Attempted to run the Perl script manually</li></ul><p>Aha!  I was on to something.  The paths listed under /Library/WebServer didn&#8217;t want to play as they were indicated.  However, if I changed to the directory of the awstats.pl file, and ran with the arguments it worked!  Well, sort of&#8230;</p><p>I kept getting errors related to the format of the Apache log files.  I did some searching and copied and edited a sample from Apache.  It looks like this:</p><ul> %h %l %u %t &#8220;%r&#8221; %&gt;s %b &#8220;%{Referer}i&#8221; &#8220;%{User-agent}i&#8221;</ul><p>It&#8217;s hard to tell, but it&#8217;s not quite the exact match as shown on Galen&#8217;s post.  At that point, I re-ran the scripts and it appeared to work.  I loaded my betterawstats page and it populated.  Almost there&#8230; almost.</p><p>Galen provided information on another tool, <a
title="Lignon download" href="http://lingon.sourceforge.net/" target="_blank">Lingon</a>, that I had never heard of before.  (Fortunately it&#8217;s still available.) Looks interesting, since I am not a cron or launchd guru by any means.</p><p>Again, following Galen&#8217;s instructions I attempted to get AWStats/Betterawstats to work automatically and refresh at some interval.  Foiled every step of the way&#8230;  It just wouldn&#8217;t work, with any setting.</p><p>Back to the command line and I changed a few permissions, primarily I changed the owner of awstats.pl to <em>root</em>.  That seemed to work, but the the script still would not load/refresh after the first run.</p><p>I got brave and created the entry as a <em>Daemon</em> as opposed to a User Agent.  I cleaned everything up and rebooted.  Lo and behold, not only did it launch at startup as evidenced by <a
title="TheCzechs.net Stats" href="http://www.theczechs.net/betterawstats/" target="_blank">my betterawstats page</a>, but also refreshed every 15 minutes as instructed.</p><p>My site doesn&#8217;t get any traffic, and is just a place for me to play and learn.  I&#8217;ll set this to something more realistic and button up the hood.  Just another day&#8230;</p><p>So, after all this you may ask, just what is this after all?</p><p><a
title="TheCzechs.net Stats" href="http://www.theczechs.net/betterawstats/" target="_blank">Check out website statistics here.</a><br
/> <br
/>.</p> ]]></content:encoded> <wfw:commentRss>http://www.theczechs.net/blog/ramblings/awstats-on-leopard-server/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
