Reputation: 4606
I need to put Nginx logs to syslog. My Nginx version in 1.6, system - Ubuntu 12.04. In Nginx config I do:
server {
# some settings here
access_log syslog:localhost;
# and some settings here
}
Make a request with curl:
curl http://localhost/
Get standard Nginx page, but syslog is still empty...
UPD: Problem was fixed after uncommenting in rsyslog.conf following lines:
#$ModLoad imudp
#$UDPServerRun 514
Upvotes: 2
Views: 9539
Reputation:
This is the nature of Syslog. In the documentation[1] you see that the default facility is local7. If you have not set a destination for that facility and created the log file, it will not go anywhere.
[1] http://nginx.org/en/docs/http/ngx_http_log_module.html
Upvotes: 2