summaryrefslogtreecommitdiff
path: root/playbooks.d/webserver-nginx/share/logrotate.conf
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2022-05-06 10:01:53 +0200
committerPatrick Spek <p.spek@tyil.nl>2022-05-06 10:01:53 +0200
commit2d402273b67d72e3c1cc84ad952151568bb8ac3c (patch)
tree0a38cab9e4df6b0cbf09c4bb922331e1fccc1b8e /playbooks.d/webserver-nginx/share/logrotate.conf
parent44c43f638420189ff18f246fc3291df2cec81516 (diff)
Add logrotate configuration for nginx
Diffstat (limited to 'playbooks.d/webserver-nginx/share/logrotate.conf')
-rw-r--r--playbooks.d/webserver-nginx/share/logrotate.conf11
1 files changed, 11 insertions, 0 deletions
diff --git a/playbooks.d/webserver-nginx/share/logrotate.conf b/playbooks.d/webserver-nginx/share/logrotate.conf
new file mode 100644
index 0000000..faa9996
--- /dev/null
+++ b/playbooks.d/webserver-nginx/share/logrotate.conf
@@ -0,0 +1,11 @@
+/var/log/nginx/access-logs/*.log {
+ daily
+ missingok
+ rotate -1
+ notifempty
+ create 0640 ${user} ${group}
+ sharedscripts
+ postrotate
+ nginx -s reopen >> /var/log/logrotate.log 2>&1
+ endscript
+}