I have an apache server that I want to set up for logging to syslog. I successfully set up the access logs to be sent to syslog, but for some reason it doesn't work for ErrorLog.
It always logs to /var/log/httpd-error.log no matter what I put in the apache config. CustomLog works fine, though.
I'm running Apache/2.4.43 installed from Packages on FreeBSD 12.1.
I made sure the global ErrorLog directive is commented out in httpd.conf:
I am putting this in each vhost config:
The ErrorLog directive works fine if I specify a filename (e.g. /var/log/httpd-app1-error.log) - it just doesn't seem to work with piped logging whereas CustomLog works with either file logging or piped logging.
Also when i type "ps aux" I do see that apache spawned the pipe command:
It just decides to log to the main /var/log/httpd-error.log though, instead of syslog, for some reason. Any suggestions on how to fix this would be greatly appreciated.
It always logs to /var/log/httpd-error.log no matter what I put in the apache config. CustomLog works fine, though.
I'm running Apache/2.4.43 installed from Packages on FreeBSD 12.1.
I made sure the global ErrorLog directive is commented out in httpd.conf:
Apache config:
#ErrorLog "/var/log/httpd-error.log"
I am putting this in each vhost config:
Apache config:
ErrorLog "|/usr/bin/logger -t httpd-app1-error -p local6.info"
The ErrorLog directive works fine if I specify a filename (e.g. /var/log/httpd-app1-error.log) - it just doesn't seem to work with piped logging whereas CustomLog works with either file logging or piped logging.
Also when i type "ps aux" I do see that apache spawned the pipe command:
Bash:
# ps aux | grep app1-error
/usr/bin/logger -t httpd-app1-error -p local6.info
It just decides to log to the main /var/log/httpd-error.log though, instead of syslog, for some reason. Any suggestions on how to fix this would be greatly appreciated.