| ||||||
AWStats on Leopard ServerI stumbled upon a pretty cool web site stats page while searching for “calibre” 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. The main “calibre” page has a “Website usage statistics” link. I followed that and was intrigued. This reminded me of a statistics page (I don’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. So I set about to install the tool. Downloading the archive from AWStats was the easy part. I then set about trying find specific instructions for my Leopard Server installation. The first attempt, through DarwinPorts (MacPorts) failed when it was looking for a dependency on Apache 2. Hold on! I know Apple’s config is slightly less than generic, but I decided not to continue this route and really screw something up. I searched for ‘manual instructions’ and came upon Galen Sprague’s blog. 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’t work in my case. I certainly can’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 ‘simple’ things, they just never quite seem to work. “Stuff” isn’t found in the paths shown, commands don’t quite run as listed, etc., etc. But today I was on a mission. I felt I was really close, but didn’t quite know where or how to proceed. More searching didn’t reveal any better information than Galen’s blog post. 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:
Aha! I was on to something. The paths listed under /Library/WebServer didn’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… 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:
It’s hard to tell, but it’s not quite the exact match as shown on Galen’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… almost. Galen provided information on another tool, Lingon, that I had never heard of before. (Fortunately it’s still available.) Looks interesting, since I am not a cron or launchd guru by any means. Again, following Galen’s instructions I attempted to get AWStats/Betterawstats to work automatically and refresh at some interval. Foiled every step of the way… It just wouldn’t work, with any setting. Back to the command line and I changed a few permissions, primarily I changed the owner of awstats.pl to root. That seemed to work, but the the script still would not load/refresh after the first run. I got brave and created the entry as a Daemon 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 my betterawstats page, but also refreshed every 15 minutes as instructed. My site doesn’t get any traffic, and is just a place for me to play and learn. I’ll set this to something more realistic and button up the hood. Just another day… So, after all this you may ask, just what is this after all? | ||||||
Copyright © 2012 Jim's New World - All Rights Reserved 153 queries. 0.373 seconds. Page optimized by WP Minify WordPress Plugin | ||||||