Apache logging and fifo's

"Charles M. Gerungan" <[email protected]>
Newsgroups gmane.comp.djb.syslog
Message-ID <[email protected]>
I'm trying to have apache 1.3 log using multilog. I've read a suggestion
on using fifo's[1], but having never used fifo's as a file, I'm trying to
understand this.

What I'm trying to accomplish is the following (if this approach has
drawbacks please share them):

    Have multilog write to
    /var/www/vhosts/domain/logs/{domain-access_log, domain-error_log}.

    Create fifo's in /var/multilog/apache (I keep all my multilogs
    there).

    Please note that Apache uses suexec.

Here's what I guess I should be doing for a virtual host for domain.tld
running as uname/gname under suexec:

# cd /var/multilog/apache
# mkfifo -m 640 domain.tld-access_log domain.tld-error_log
# chown uname:multilog domain.tld-access_log domain.tld-error_log

Use this in /usr/local/etc/apache/httpd.conf

CustomLog /var/multilog/apache/domain.tld-access_log combined
ErrorLog /var/multilog/apache/domain.tld-error_log

Create the run script:

#!/bin/sh/
exec </var/multilog/apache/domain.tld-access_log
exec setuidgid multilog multilog t \
    /var/www/vhosts/domain/logs/domain-access_log

exec </var/multilog/apache/domain.tld-error_log
exec setuidgid multilog multilog t \
    /var/www/vhosts/domain/logs/domain-error_log

Am I on the right track?

[1] http://marc.theaimsgroup.com/?l=log&m=99402067013704&w=2

-- 
Regards, Charles.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.