Created
May 8, 2012 20:02
-
-
Save schowdhury/2638887 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
----------------------------- | |
logrotate | |
----------------------------- | |
modify /etc/logrotate.d/apache2 with content | |
##### | |
/var/log/apache2/*.log { | |
daily | |
missingok | |
rotate 20 | |
compress | |
delaycompress | |
notifempty | |
create 640 root adm | |
sharedscripts | |
postrotate | |
/etc/init.d/apache2 reload > /dev/null | |
endscript | |
} | |
##### | |
create /etc/logrotate.d/<my app> with content | |
##### | |
/home/deployer/<my app>/current/log/*.log { | |
daily | |
missingok | |
rotate 20 | |
compress | |
delaycompress | |
notifempty | |
create 644 deployer deployer | |
sharedscripts | |
} | |
##### |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment