Commit 4ea498e

mo khan <mo@mokhan.ca>
2015-05-02 04:11:34
add nginx lograte configuration.
1 parent 9dde7d2
Changed files (1)
templates
templates/default/nginx_logrotate.erb
@@ -0,0 +1,19 @@
+/var/log/nginx/*.log {
+  daily
+  missingok
+  rotate 52
+  compress
+  delaycompress
+  notifempty
+  create 0640 nginx adm
+  sharedscripts
+  dateext
+  prerotate
+    if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
+      run-parts /etc/logrotate.d/httpd-prerotate; \
+    fi \
+  endscript
+  postrotate
+    [ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid`
+  endscript
+}