Nginx日志切割
1. 使用logrotate(推荐)
/etc/logrotate.conf配置文件内容:
cat /etc/logrotate.conf
# see "man logrotate" for details
# rotate log files weekly
weekly
# keep 4 weeks worth of backlogs
rotate 4
# create new (empty) log files after rotating old ones
create
# use date as a suffix of the rotated file
dateext
# uncomment this if you want your log
订阅专栏 解锁全文
1102

被折叠的 条评论
为什么被折叠?



