Logrotate Beispiel nginx
Version vom 26. März 2025, 19:22 Uhr von Thomas.will (Diskussion | Beiträge)
Die Konfiguration für nginx könnte wie folgt aussehen
- cat /etc/logrotate.d/nginx
/var/log/nginx/*log {
daily
missingok
rotate 3
notifempty
dateext
dateformat -%Y-%m-%d
create 640 nginx adm
compress
sharedscripts
postrotate
test ! -r /run/nginx.pid || kill -USR1 `cat /run/nginx.pid`
endscript
}