title: logs froom Nginx to rsyslog
body: <p>I want to send logs from nginx to local rsyslog via udp (and then send from local rsyslog to remote syslog-ng =&gt; redis =&gt; logstash, etc.)</p>
  <p>my nginx virtual host configuration contains the following line <strong>/etc/nginx/sites-enable/01_myserver.conf</strong></p>
  <pre><code>access_log syslog:server=127.0.0.1:415,facility=local4,severity=notice main;
  </code></pre>
  <p>my configuration <strong>/etc/rsyslog.conf</strong></p>
  <pre><code>$PreserveFQDN on
  $MainMsgQueueTimeoutEnqueue 0
  $MaxMessageSize 12k
  $template LongTagForwardFormat,&quot;&lt;%PRI%&gt;%TIMESTAMP:::date-rfc3339% %HOSTNAME% %syslogtag%%msg:::sp-if-no-1st-sp%%msg%&quot;
  $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
  $ActionForwardDefaultTemplate LongTagForwardFormat
  $IncludeConfig /etc/rsyslog.d/*.conf
  
  *.info;mail.none;authpriv.none;cron.none;local3.none;local2.none;local4.none;local5.none;local6.none;local0.none;local1.none /var/log/messages
  
  authpriv.* /var/log/secure
  mail.* /var/log/maillog
  cron.* /var/log/cron
  uucp,news.crit /var/log/spooler
  local7.* /var/log/boot.log
  </code></pre>
  <p>my configuration is <strong>/etc/rsyslog.d/server_for_nginx.conf</strong></p>
  <pre><code>$ModLoad imudp
  $UDPServerRun 415
  $FileCreateMode 0640
  $RepeatedMsgReduction off
  $AllowedSender UDP, 127.0.0.1
  </code></pre>
  <p>but I don't see nginx logs being sent to rsyslog port 415... checking with <code>tcpdump -vv -n -X port 415</code></p>
  <p>What am I doing wrong and what is my mistake?</p>