: Rotating mod_security logs with rotatelog I would like to rotate mod_security logs with rotatelogs, as this does not need a restart of the httpd, like logrotate does. However, it seems like mod_security
I would like to rotate mod_security logs with rotatelogs, as this does not need a restart of the httpd, like logrotate does. However, it seems like mod_security does not want to work together with rotatelogs. In my mod security config I have
SecDebugLog "|/usr/sbin/rotatelogs -l -f /var/log/httpd/modsec_debug.%Y.%m.%d 86400"
This gives me at startup of my httpd:
Syntax error on line 45 of /etc/httpd/conf.d/mod_security.conf:
ModSecurity: Failed to open debug log file: /etc/httpd/|/usr/sbin/rotatelogs -l -f /var/log/httpd/modsec_debug.%Y.%m.%d 86400
So I assume the mod security log directives do not play together with rotatelogs. Has anyone found a way around this?
EDIT I found logging through a fifo, but as the answers explain this seems not to be such a great idea.
EDIT 2 It works for the Audit log, but not for the debug log.
More posts by @Sherry384
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.