|
|||||||||
![]() |
|||||||||
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] VirtualHost logging solution
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.
If you want more explication or sample code drop me an email directly.
|