separating webstats for different virtualhosts - Printable Version +- Linux-Noob Forums (https://www.linux-noob.com/forums) +-- Forum: Linux Server Administration (https://www.linux-noob.com/forums/forum-8.html) +--- Forum: LAMP (https://www.linux-noob.com/forums/forum-83.html) +--- Thread: separating webstats for different virtualhosts (/thread-598.html) |
separating webstats for different virtualhosts - anyweb - 2009-08-08 hi all as part of the server complete overhaul, i'm now for the first time separating webalizer stats for my websites (virtualhosts) as I havn't done this before perhaps i am doing it wrong so please let me know if thats the case i've had to create a webalizer.conf for site A (this one) and in the conf file i have the options i want... now the next bit is telling cron to run it, i already see there is a cron job in /etc/cron.daily/00webalizer so i edit it to point to the linux noob website location and tell it to look for those log files plus point it to the stats directory it works, i now have stats for linux-noob.com only, so, do I create a separate conf file for each site in turn and create a separate cron job for each ? why is there a 00 infront of this cron job ? separating webstats for different virtualhosts - Dungeon-Dave - 2009-08-08 Quote:so, do I create a separate conf file for each site in turn and create a separate cron job for each ? why is there a 00 infront of this cron job ?I would create a separate conf file and cronjob for each site, so that they're isolated from each other - changes made to one site config won't affect the other, for example. But that's just me; others have been known to consolidate similar jobs into one file. The 00 bit is just to prioritise it within that directory, since the system cron runs each file in alphabetical order - eg: "bwstats.sh" will run after "apache2-update.conf" but after "delete-spam.pl". If I call a script "0-runme" then it appears "higher" than anything beginning with "a". separating webstats for different virtualhosts - anyweb - 2009-08-10 fixed it ! you need separate cron jobs for each site you want stats for plus that cron job must point to a unique webalizer.conf file for that site, Quote:#! /bin/bash# update access statistics for the web site the log files referenced in webalizer.conf must be for each unique site Quote:LogFile /var/log/httpd/linux/access.log in addition i had to create some additional directories and edit the webalizer.conf file for each site separatly with some additional settings make some new dirs for webalizer [root@linux-noob]# mkdir /var/lib/webalizer/websites [root@linux-noob]# mkdir /var/lib/webalizer/websites/windows [root@linux-noob]# mkdir /var/lib/webalizer/websites/linux [root@linux-noob]# vi webalizer.conf [root@linux-noob]# sh /etc/cron.daily/01webalizer verify the following paths are correct for separate logging in webalizer for each website so for linux-noob.com webalizer stats Quote:HistoryName /var/lib/webalizer/websites/linux/webalizer.hist and for windows-noob.com webalizer stats Quote:HistoryName /var/lib/webalizer/websites/windows/webalizer.hist |