nginx 添加的配置信息

使用logrotate管理Nginx日志配置如下:

[root@vm-10-129-93-51 nginx]# vi /etc/logrotate.d/nginx 

/letv/log/nginx/*.log {
daily
dateext
missingok
rotate 2
compress
notifempty
create 640 nginx adm
sharedscripts
postrotate
        [ -f /var/run/nginx.pid ] && kill -USR1 `cat /var/run/nginx.pid`
        `cp -f /letv/log/nginx/*.* /letv/log/nginx/backup`
endscript
}
~                           

  

 

 

posted @ 2017-06-06 17:51  Quan7  阅读(214)  评论(0编辑  收藏  举报