分割nginx日志(logrotate)

使用nginx自带的logrotate来分割nginx日志。nginx 1.创建定时任务。天天凌晨执行。   #手工对nginx日志进行切割转换  /usr/sbin/logrotate -vf /etc/logrotate.d/nginx  #只保留最近7天的压缩转储日志文件  find //usr/local/nginx/logs/* -name “*.log” -mtime 7 -type
相关文章
相关标签/搜索