Jeremy Smith's blog

Entry Is Labelled

Re-thinking Blog@Case Per-User Web Site Statistics

You know, now that I am thinking about the Blog@Case web server stats (on a per-user basis), I find myself with two questions:

  1. Why am I trying to reinvent the wheel?
  2. Why should I dictate the one true web server stat tracker software for all Blog@Case users?

I can think of a much better way. First, continue to use mod_log_mysql. Nightly, run a script that SELECT's out the statistics pertinent to each user's blog. Write those stats into the common web server log file format, and store them for each user under<username>/logs. Now, any user could download his or her stats and use whatever web server log file analysis tools he or she wants to. Obviously, ITS will provide them with something (we'll use the same log files and generate the graphs using Webalizer or AWStats or whatever and we'll set them down into<username>/stats for perusal).

There is a possible problem with this. Some users might not like their log files or their web site's stats available to everyone. They might want it for their eyes only. To fix that, I could automatically write .htaccess files into the /log and /stats directories; and via the magic of LDAP, restrict those directories to just the blog owners. Of course, user's could do that for themselves via WebDAV. Just mount their blog's web root and write in their own .htaccess.

Eh, well, just kind of pondering it. Though, I am definitely going with the idea of not writing my own web server's log file statistics generator. (Why was I even considering that in the first place?) Rather, I will compile per-blog access_log and error_log files and use the right tool for the job on them.

Sometimes, it's more about integration, not invention.