Skip to topic | Skip to bottom
Home
Socialtools
login



Socialtools.ExpWebstatsr1.1 - 02 Jul 2004 - 02:02 - TWikiGuesttopic end

Start of topic | Skip to actions

homepage

Webalizer homepage: http://www.mrunix.net/webalizer/

technique used for multiple virtual hosts

We're using technique described at http://www.mrunix.net/webalizer/faq.html .
Here's the relevant part:

  17. How can I easily process multiple virtual hosts?

  There are many ways to process multiple virtual hosts on the same machine. 
  The easiest way I have found, provided that each host generates it's own log file, is as follows:

  1. Create a central directory for your configuration files. (I use /etc/webalizer)
  2. Make a configuration file for each virtual host and place them in the central directory. 
     Each configuration file should have at least the HostName (domain), OutputDir and LogFile
     configuration settings specified. You probably will want to specify other settings specific
     to the domain, such as HideReferrer, HideSite and maybe some others as well. Name the file
     the same as the domain name, and end it with a .conf extension, so you can easily tell what     
     vhost the configuration is for.
  3. To process all your virtual sites with a single command, a simple shell command can now
     be used:

        for i in /etc/webalizer/*.conf; do webalizer -c $i; done

  After you have it set up, to add a new host, all you need to do is create a new
  configuration file and put it in the directory. It will be automatically picked up
  the next time you run the command. 

technique used for DNS resolution (Usage by Country)

all symlinks in /var//www/webalizer-vhosts will be processed
by webalizer cronjob. Their logs have to exactly in the
location and file that webalizer expectes them in.

format is:

  /var/www/mydomain.bla/logs/access.log

All vhosts symlinks found in webalizer-vhosts directory will
be processed by placing the symlink name in the above format,
instead of mydomain.bla. Webalizer will attempt to resolve
DNS for all IP's found in each access log, and will save
all results into a single DNS cache file. That file be 
used to create stats with "stats by country" working fine.

See ftp://ftp.mrunix.net/pub/webalizer/DNS.README

installation and setup

get it running: webalizer, its cron and config for first domain

  1. apt-get source webalizer. apt-get install libdb3-dev
  2. unpack it, cd into the webliazer dir, the do ./configure --enable-dns, then make
  3. become root, or sudo to install it: make install
  4. edit attached config file for your domain and create your OutputDir
  5. mkdir /var/www/www.yourdomain.net/stats/htdocs/
  6. rename it, ending with .conf (www.yourdomain.net.conf)
  7. i had to use combined logs in apache virtual host for my domain
    for webalizer to pick up some stats. so if you need to do that too, do
    CustomLog /www/www.yourdomain.net/logs/access.log combined
  8. mkdir /var/www/webalizer-vhosts/
  9. ln -s /var/www/www.yourdomain.net /var/www/webalizer-vhosts/
  10. mkdir /etc/webalizer/
  11. cp www.yourdomain.net.conf /etc/webalizer/
  12. to get it running, copy attached webalizer script to daily cron
  13. cp webalizer /etc/cron.daily/

virtual host for webalizer

  1. get your stats.yourdomain.net resolving to start with
  2. copy virtual domain attached here to your apache virtual host scheme
  3. cp stats.yourdomain.net /usr/local/apache/conf/vhost
  4. add include conf/stats.yourdomain.net to /usr/local/apache/conf/virtual_hosts
  5. mkdir /var/www/stats.yourdomain.net/stats/logs
  6. /usr/local/apache/bin/apachectl configtest
  7. /usr/local/apache/bin/apachectl graceful
  8. check apache log for errors
  9. run webalizer once manually so you have something to look at right away: /etc/cron.daily/webalizer
  10. enjoy your stats

to top

I Attachment sort Action Size Date Who Comment
DNS.README manage 8.0 K 02 Jul 2004 - 02:00 ToniPrug webalizer DNS howto
webalizer manage 1.1 K 02 Jul 2004 - 02:02 ToniPrug new cronjob script, with DNS caching
www.open-organizations.org.conf manage 1.4 K 02 Jul 2004 - 02:06 ToniPrug config file, added category display limits
stats.yourdomain.net manage 0.5 K 02 Jul 2004 - 02:07 ToniPrug apache virtual host

You are here: Socialtools > ServerConfigExperimental > ExpWebstats

to top

Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Open-org? Send feedback