roach57
Python,Linux,运维自动化,Shell

导航

 
 1 vim /etc/logrotate.d/nginx-server
 2 [root@GNOP017-CN-DUAL-GDST-133-119 logrotate.d]# cat nginx-server 
 3 /var/log/nginx/access.log /var/log/nginx/error.log {
 4         daily
 5         missingok
 6         rotate 7
 7     minsize 50M
 8         compress
 9         delaycompress
10         notifempty
11         sharedscripts
12         postrotate
13         /etc/init.d/nginx reload > /dev/null
14         endscript
15 }

 

posted on 2016-01-12 11:20  roach57  阅读(178)  评论(0)    收藏  举报