This is very simple program allowing ISPs to monitor trafic generated by
VirtualHosts. It require nearly no configuration. The names of VirtualHosts
are readed from Apache's log...

The trafic is stored in hash in-memory database. So, it's consums really
minimum of system resorces.

INSTALATION:

0. If you are a big ISP (with more then 500 domains), increse the HASH_SIZE
macro in vhost_stat.c.

1. Compile the program:
	gcc -o vhostd vhost_stat.c
2. Add UNIX user and group "vhostd" to your system:
	groupadd vhostd
	useradd -d / -s /bin/false -g vhostd vhostd
3. Compile the Apache web server with mod_logio or load this module
	http://httpd.apache.org/docs-2.0/mod/mod_logio.html
4. Create a pipe:
	mknod /full/path/to/the/pipe p
5. Add special log format to you Apache configuration:
	LogFormat "%v %I %O" iolog
6. Add this line to each VirtualHost directive:
	CustomLog "/full/path/to/the/pipe" iolog
7. It's it ;o)

USAGE:

1. Stop Apache
	apachectl stop
2. Run vhostd
	./vhostd /full/path/to/the/pipe # really full path...
3. Run Apache
	apachectl start
4. If you are using an inet.d script for starting Apache at startup, modify
it to start vhostd first...

5. Forgot about vhostd - it can (and should) run infinitely - even if you
restart Apache...

ATTENTION: You MUST start vhostd before you start Apache. If nobody reads
the pipe, Apache will not work.

Now you can see the trafic of each VirtualHost by sending USR1 signal to
vhostd:
	kill -USR1 `cat /var/run/vhostd.pid`

The trafic report is in /tmp/vhost_report file.

By sending HUP signal to vhostd you does the same, but you also zero the
counters.

	kill -HUP `cat /var/run/vhostd.pid`
