The latest addition to the collection of lame scripts I wrote and put online completely automates the trivial yet tedious task of Awstats batch Apache log reports production, with full history and even where multiple vhosts coexist.

And the icing on the cake is that it does it quite efficiently : it always updates the reports for the current month and the current year, but only produces other reports if they do not exist. To force the regeneration of a report, you simply erase it.

If a user wishes to control the access to a report for a vhost he must create a .htaccess file named /etc/awstats/.htaccess.vhost.name.tld
This file will be automatically detected and used. This is dead simple, and it just works.

Grab the code ! It is in production on this very server as the sample output testifies.