Last active
April 9, 2018 01:44
-
-
Save bearlyrunning/c7c8f459672c93a7e6a1a8843edc010e to your computer and use it in GitHub Desktop.
Log Rotation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/var/log/apache2/*.log { | |
daily | |
missingok | |
rotate 14 | |
compress | |
delaycompress | |
notifempty | |
create 400 root root | |
sharedscripts | |
postrotate | |
if /etc/init.d/apache2 status > /dev/null ; then \ | |
/etc/init.d/apache2 reload > /dev/null; \ | |
fi; | |
endscript | |
prerotate | |
if [ -d /etc/logrotate.d/httpd-prerotate ]; then \ | |
run-parts /etc/logrotate.d/httpd-prerotate; \ | |
fi; \ | |
endscript | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment