cronolog.org
flexible web log rotation
HOME
DOWNLOAD
FEATURES
USAGE
FAQ
BLOG
KNOWN BUGS
SECURITY
PATCHES
USERS
TO DO
HISTORY
LINKS
FEEDBACK
MAILING LIST
ADVERTISING

support cronolog development



Google   HELP


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

VirtualHost logging solution


  • To: cronolog-users@xxxxxxxxxxxxxxxxxx
  • Subject: VirtualHost logging solution
  • From: Toxik - Martial Rioux <martial.rioux@xxxxxxxxx>
  • Date: Fri, 18 Jan 2002 16:21:02 -0500
  • Organization: Toxik Technologies Inc.
  • User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20011126 Netscape6/6.2.1

Hi,


Yesterday I have playing with name pipe to make apache writing to one log file and send them to cronolog directly using virtual host table definition (vhost1,/home/vhost1/logs/www.vhost1.com-access_log,etc) instead of writing one log by virtual host.


Scenario:

1) mkfifo /tmp/access_log
2) modify httpd.conf to use /tmp/access_log (don't use this path in production mode for security raison) for your virtualhost
3) replace cronolog to read from /tmp/access_log file (default is stdin)
4) start cronolog
5) start apache


Now you have no more then one cronolog process for this name pipe. Conceptualy the only things todo is a I/O Multiplexing.

You can modify mod_config_log or write your own deamon to do that.

By the way you also make a uniq entry field in your log to splitt them, just modify CustomLog definition in httpd.conf and add virtual servername variable.

I'm writing this to restart virtual host logs subject.


Any informations or comments are welcome.

If you want more explication or sample code drop me an email directly.


-- Martial Rioux Infrastructures and Technologies www.toxik.com



Copyright © 1996-2010 Andrew Ford and Ford & Mason Ltd