Last active
April 26, 2021 17:33
-
-
Save molotovbliss/60830cf505b6231852fe to your computer and use it in GitHub Desktop.
Magento Log Rotate with logrotate
This file contains 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
The magento-logrotate.conf file contents: | |
/path/to/magento/var/log/*log { | |
rotate 7 | |
daily | |
compress | |
missingok | |
notifempty | |
copytruncate | |
create 660 www-data www-data | |
} | |
Adjust `create 660 www-data www-data` as needed per environment. | |
Add a Daily cron to rotate your logs: | |
0 0 * * * /usr/sbin/logrotate -f /path/to/magento-logrotate.conf |
I think you are missing something
copytruncate create 660 www-data www-data
change user and group according with your setup.
Thanks, added!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think you are missing something
change user and group according with your setup.