If you are hosting an official or unofficial mirror, and you would like to have local stats support, follow these steps. This document complements the instructions found on the mirroring page.
Get The Webalizer
The Webalizer is a web server log analysis program. It is designed to scan web server log files in various formats and produce usage statistics in HTML format for viewing through a browser. Note that Webalizer requires you to have the GD library installed on your site.
Install The Webalizer
There is a
configure file in the distribution now, and other setup options
are also available. Consult the
INSTALL file included in the package.
Copy the executable to somewhere accessible, eg.
Grab mirror-stats.conf and edit the file.
This is the main conf file for The Webalizer. Specifically, you will want to change the lines which define where your log file sits, where the output should go, and the name of your host machine. Look for these settings: LogFile, OutputDir, HostName, HideSite, HideReferrer. The stats directory is not required to be in the webroot, it may be aliased to be there (see mirroring.php).
Give it a test
From the command line in the stats directory, type:
webalizer -c mirror-stats.conf You should get an index
file, a usage file for the current month, some images,
and a history file.
Add it to your cron
If all went well, in the previous step, it is ready to be updated regularly. Something like this will be sufficient (update things daily at 3 am):
0 3 * * * (cd /your/stats/folder;/usr/bin/webalizer -c mirror-stats.conf) >/dev/null 2>&1
Provide the path of the stats directory in the "cd".
If you have any questions, try to ask them on the PHP Mirrors' mailing list (email@example.com). We cannot guarantee, that we can solve your problem, of course, but it is worth a try.