AWS BeansTalk add Nginx logrotate config
Task: Add configuration file with Nginx logrotate
Implementation:
Add file ./.ebextensions/logrotate.config
files:
"/etc/logrotate.d/nginx":
mode: "000644"
content : |
/var/log/nginx/*.log {
daily
compress
delaycompress
rotate 30
dateformat -%Y-%m-%d
missingok
sharedscripts
postrotate
test ! -f /var/run/nginx.pid || kill -USR1 `cat /var/run/nginx.pid`
endscript
}
Done.