[root@nginx1 ~]# vim /etc/logrotate.d/nginx 
/usr/local/nginx/log/*.log {
        daily
        dateext
        missingok
        rotate 90
        compress
        notifempty
        create 640 nginx root
        sharedscripts
        olddir /usr/local/nginx/log/archive
        postrotate
                [ -f /var/run/nginx.pid ] && kill -HUP `cat /var/run/nginx.pid`
        endscript
}
logrotate -vf /etc/logrotate.d/nginx  强制轮转

相关文章:

  • 2021-12-31
  • 2021-12-05
  • 2022-01-09
  • 2021-09-14
  • 2022-01-03
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-07
  • 2021-08-16
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案