Mobile app version of vmapp.org
Login or Join
Sherry384

: 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

@Sherry384

Posted in: #Httpd #Logging #ModSecurity

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.

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Sherry384

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme