From bc96a087dde90543f3cc13d62d56e87df847c2d2 Mon Sep 17 00:00:00 2001 From: SeniorDev Date: Mon, 10 Aug 2026 14:31:44 +0800 Subject: [PATCH] =?UTF-8?q?P0-1+P2-1+P2-3:=20=E4=BF=AE=20OTel=20traces=20p?= =?UTF-8?q?ipeline=20+=20DROP=20LangBot=20=E8=A1=A8=20+=20nginx=20logrotat?= =?UTF-8?q?e=20+=20cron?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/logrotate-qihu.conf | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 deploy/logrotate-qihu.conf diff --git a/deploy/logrotate-qihu.conf b/deploy/logrotate-qihu.conf new file mode 100644 index 0000000..6e55a76 --- /dev/null +++ b/deploy/logrotate-qihu.conf @@ -0,0 +1,36 @@ +# 七虎平台 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 \ No newline at end of file