1 vim /etc/logrotate.d/nginx-server 2 [[email protected] 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 }
时间: 2025-01-11 13:18:40