Files
qihuaiflow/deploy/logrotate-qihu.conf

36 lines
938 B
Plaintext

# 七虎平台 logrotate 配置
# 2026-08-10 — P2-3 (体检报告 #2.3 nginx access.log 6.3GB)
# 容器内只管 nginx log;auth.log 由宿主 rsyslog 管理
# nginx access.log: 每日滚动 + 保留 14 天 + 压缩
/var/log/nginx/access.log {
daily
rotate 14
compress
delaycompress
missingok
notifempty
create 0640 www-data adm
sharedscripts
postrotate
[ -f /var/run/nginx.pid ] && kill -USR1 $(cat /var/run/nginx.pid) || true
endscript
}
# nginx error.log: 每日滚动 + 保留 7 天
/var/log/nginx/error.log {
daily
rotate 7
compress
delaycompress
missingok
notifempty
create 0640 www-data adm
sharedscripts
postrotate
[ -f /var/run/nginx.pid ] && kill -USR1 $(cat /var/run/nginx.pid) || true
endscript
}
# auth.log 由宿主 rsyslog 自管(容器无 rsyslogd,无 syslog user)
# 如需在容器内管,需先 apt-get install -y rsyslog