Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

My nginx sends lots of messages to syslog, but I don't need them. In my nginx.conf:

      error_log  /var/log/nginx-error.log  notice;
        ......
      server {
      access_log  off;
      location /
      {
         .... 
        }
      }

but, in my /var/log/message you see

Nov 22 23:25:09 cache3 nginx: 2011/11/22 23:25:09 [error] 3437#0: *32172530         kevent() reported about an closed connection (60: Operation timed out) while reading response header from upstream, client: , server: , request: "GET http://www.igoido012.com//vk HTTP/1.1", upstream: "http:////vk", host: "www.igoido012.com", referrer: "http://www.baidu.com/"
Nov 22 23:25:09 cache3 nginx: 2011/11/22 23:25:09 [error] 3437#0: *32099531 upstream timed out (60: Operation timed out) while reading response header from upstream, client: , server: , request: "GET http://t.web2.qq.com/channel/poll?msg_id=0&clientid=431509&t=1321975433305 HTTP/1.1", upstream: "http://:80/channel/poll?msg_id=0&clientid=431509&t=1321975433305", host: "t.web2.qq.com", referrer: "http://t.web2.qq.com/proxy.html?v=20110331001"

How can I prevent nginx sending messages to my syslog?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

I wasn't aware that nginx would send to syslog without patching:

http://wiki.nginx.org/3rdPartyModules#Third_party_patches

So, I assume you have a custom build of nginx. Take a look at the patch source for hints on how to configure that:

https://github.com/yaoweibin/nginx_syslog_patch

If you're running a straight nginx, then something else is putting those log entries into syslog.

share|improve this answer
    
On FreeBSD it's an option when you run 'make config.' Maybe that's what OP did. Just like I, which is why I found this post. :-) –  drumfire May 7 '12 at 23:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.