11lxm 发表于 2018-11-14 09:09:41

nginx日志轮询

  /home/www/nginx/logs/*log                     {
  daily                                                                               每天执行一次日志轮询
  rotate
  missingok                                                                                                                                             notifempty
  compress
  dateext                                                             日志rotate后再后面加日期
  sharedscripts                                                    有多个日志需要轮询时,只执行一次脚本
  postrotate
  [ ! -f /home/www/nginx/logs/nginx.pid ] || kill -USR1 `cat /home/www/nginx/logs/nginx.pid`
  endscript
  }

页: [1]
查看完整版本: nginx日志轮询