The default setup for awstats is really aimed at a minimal number of web site or other logs and the ability to setup specific config files for each site is good but seems a little top heavy.
The awstats.conf and awstats.conf.local files provide for the single site type setup. Configure the main .conf settings or alternatively add the specific overrides of the defaults into the awstats.conf.local file and all is good.
Using the awstats.model.conf for multiple web sites and copying it to a site specific file also is a good plan for a nominal number of sites.
But once we get to having 37 sites it is getting a bit out of hand.
So how to improve the process and automate it?
Roughly:
- Have a standard config file for all the standard settings
- Have a standard log file format for the specific type of log being stat’d
- Have a header type config file that is specific to the site or URL being stat’d
- Combine them all on-the-fly by using the Includes option in the awstats config files
I think the order should be:
awstats looks in /etc/awstats when the updateall process is executed
in the /etc/awstats directory are the header files which look like:
#include main config file from somewhere else (it cannot be in this directory as it would be read as a conf file directly)
#include the required log file format – parsing both apache and windows logs
#have only the site specific instructions in the file so that the file size and chance of overriding config standards is reduced
I’ll experiment with the above and update this with the result.