logrotate: use better size+time rotation approach

This commit is contained in:
Daniel Micay 2025-11-05 23:46:15 -05:00
parent 5f2e4a45c3
commit c9b84fdb79
2 changed files with 16 additions and 18 deletions

View file

@ -1,8 +1,16 @@
/var/log/nginx/access.log /var/log/nginx/error.log {
/var/log/nginx/access.log {
missingok
sharedscripts
maxsize 1G
nodelaycompress
postrotate
syslog-ng-ctl reopen >/dev/null
endscript
}
/var/log/nginx/error.log {
missingok
maxsize 64M
nodelaycompress
maxsize 2G
postrotate
syslog-ng-ctl reopen >/dev/null
endscript