title: Nginx write logs to the old file after running logrotate
body: <p>The logrotate config is:</p>
  
  <pre><code>cat /etc/logrotate.d/nginx:
  
  /data/logs/nginx/*.log
  {
  daily
  dateext
  dateformat .%Y-%m-%d
  rotate 30
  missingok
  create
  notifempty
  sharedscripts
  postrotate
          [ ! -f /usr/local/nginx/logs/nginx.pid ] || kill -USR1 `cat /usr/local/nginx/logs/nginx.pid`
  endscript
  }
  </code></pre>
  
  <p>But nginx write logs to the access.log.2016-05-15, not access.log</p>
  
  <pre><code>-rw-r--r-- 1 www  root    0 May 14 03:46 access.log
  -rw-r--r-- 1 www  root  47M May 16 10:26 access.log.2016-05-15
  </code></pre>
  
  <p>How should I fix it? Thanks.</p>