linux下ngix日志自动翻滚

vi

 /

etc/

logrotate.d/

nginx

/var/log/nginx/*.log {
  daily
  missingok
  compress
  rotate 30
  dateext
  notifempty
  sharedscripts
  extension gz
  postrotate
    [! -f /var/log/nginx/nginx.pid ] || kill -USR1 `cat /var/log/nginx/nginx.pid`
  endscript
}
 

/
etc/
init.d/
syslog
 restart

你可能感兴趣的:(linux,nginx,F#)