Terry Burton's blog
The weblog of Terry Burton, Leicester, UK

<<< Home

Apache accesslog to syslog

By , .

Apache allows its error logs to be written to local syslog, however it does not natively support the directing of access logs to the syslog. How frustrating!

It does however allow access logs to be written to a pipe and I have seen a number of home-brew scripts that essentially redirect the Apache access log data from STDIN to syslog.

I’ve yet to see anything quite as simple as the following directive that I cooked up today:

CustomLog "||/usr/bin/logger -t apache -i -p local6.notice" combined

It pipes the access log data to the BSD logger(1) utility that is installed by default on almost any Unix system. No need for any more of those STDIN wrapper scripts!

<<< Home


Homepage | Online Barcode Generator | Barcode Writer in Pure PostScript