From 074a92bc1571cf5f1d039cea2348d8b134aa1f75 Mon Sep 17 00:00:00 2001 From: Dmitry Ilvokhin Date: Thu, 21 Dec 2023 16:37:22 +0000 Subject: Enable logrotate for nginx logs --- roles/web/files/nginx | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 roles/web/files/nginx (limited to 'roles/web/files') diff --git a/roles/web/files/nginx b/roles/web/files/nginx new file mode 100644 index 0000000..da8ba47 --- /dev/null +++ b/roles/web/files/nginx @@ -0,0 +1,12 @@ +/var/log/nginx/*log { + missingok + notifempty + create 640 http root + daily + rotate 14 + sharedscripts + compress + postrotate + test ! -r /run/nginx.pid || kill -USR1 `cat /run/nginx.pid` + endscript +} -- cgit v1.2.3-70-g09d2