Using Webalizer with MySQL
Having setup my server to use MySQL for apache virtual hosts, and to log to MySQL for it’t access log, I needed a way to generate web stats for each of the websites hosted on my server. Because I love PHP, I decided to create a php script to extract the logs from the database, and create statistics for each site on my server.
I run this script daily using cron, it will most likely need some editing to work on your system, but other then changing the variable defintions at the top, no major changes should be needed.
The files you need to use there are here
- webalizer.template - place this is /etc/sas/webalizer.template
- webalizezr script - Run this script from cron as often as you like.
Feel free to email me if you need more help with this script, and please do let me know if you change it or improve it atall.