2

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 

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

3 Comments

So I should also add a path to file for according facility to syslog config, shouldn't I? I thought I can do it only with editing Nginx config
You can change the facility, to an existing one. See your syslog.conf.
I solved my problem(see UPD section in my question), thanks for your answer - it gave me right direction!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.