You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nginx: service needs to be restarted for modsecurity log rotation
Because modsecurity is not re-opening its logfile after rotation and continues to write into the same file descriptor, nginx needs to be restarted for the rotation to take effect.
Better handling of that situation is stuck upstream for several years.
We use the presence of `/var/log/modesc_*.log` as a heuristic for modsecurity being enabled, these files are now rotated with a restart of nginx.
Note that, due to overlapping wildcard matches, this specific case got a higher logrotate match priority and needs an `ignoreduplicates`.
Restarting nginx can have the impact of a very brief downtime and connections being dropped. logrotate.timer runs hourly, but as we've empirically observed that the majority of actual rotations takes place during the night, we refrain from restricting the logrotate runs to the night for now.
PL-132296
0 commit comments