Skip to main content

Raymii.org Logo (IEC resistor symbol) logo

Quis custodiet ipsos custodes?
Home | About | All pages | RSS Feed | Gopher

Apache access/error log to syslog

Published: 15-12-2013 | Author: Remy van Elst | Text only version of this article


Table of Contents


This snippet shows you how to redirect the Apache access log to syslog using the Customlog statement, and the Error log to syslog via the ErrorLog statement.

If you like this article, consider sponsoring me by trying out a Digital Ocean VPS. With this link you'll get $100 credit for 60 days). (referral link)

Using the double pipe prevents spawning a shell for every hit. Append the below line to a vhost to have everything logged to syslog.

CustomLog "||/usr/bin/logger -t apache -i -p local5.notice" combine

The error log can be appended to syslog using the following statement:

 ErrorLog syslog:local6
Tags: acces-log , apache , error-log , log , logging , snippets , syslog