Send Apache Access Logs to syslog
        Posted  
        
            by 
                Seer
            
        on Server Fault
        
        See other posts from Server Fault
        
            or by Seer
        
        
        
        Published on 2013-11-01T09:11:26Z
        Indexed on 
            2013/11/01
            9:58 UTC
        
        
        Read the original article
        Hit count: 408
        
We have IBM HTTP Servers (Based on Apache 2.0) and want to send the access logs to syslog. (in addition to error logs which does work)
The config we are using is as follows:
ErrorLog "|/HTTPServer/bin/rotatelogs /archive/http/error_log.%Y%m%d 86400 | /usr/bin/logger -t httpd -plocal6.err"
LogLevel warn
LogFormat "%h %{True-Client-IP}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %D \"%{Host}i\" %v" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog "|exec /usr/bin/logger -t ptseelm-ax3004 -i -p local6.notice" combined
But the logs entries don't even appear in the local syslog.out
here is what the processes look like:
ps -ef | grep httpd
apache  6226000  8388618   0 09:04:01      -  0:00 /HTTPServer/bin/httpd -d /HTTPServer -k start
apache  6750220  8388618   0 09:04:01      -  0:00 /HTTPServer/bin/httpd -d /HTTPServer -k start
apache  7602390  8388618   0 09:04:01      -  0:00 /HTTPServer/bin/httpd -d /HTTPServer -k start
root  8388618        1   0 09:04:01      -  0:00 /HTTPServer/bin/httpd -d /HTTPServer -k start
root  9044038  8388618   0 09:04:01      -  0:00 /usr/bin/logger -t httpd -plocal6.err
So there is no logger attached to the child processes... is that the problem? Can someone help me out? :)
We have the following in syslog.conf:
local6.*        @somerealipaddress
© Server Fault or respective owner