Project

General

Profile

Actions

Feature #3485

closed

Log rotation for mod_security

Added by Stéphane Lapie about 10 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
02/24/2014
Due date:
% Done:

0%

Estimated time:
Plus Target Version:

Description

As it stands, mod_security+apache does not rotate any logs generated by Apache, which can cause problems down the road for a load balancer operating years on end.

I can use rotatelogs for my own custom logs, but the default logs /var/log/httpd.log and /var/log/httpd-error.log are configured by the templated configuration, so this is out of my hands. I can also add my own cron job to rotate or find old logs and remove them, but this would be better if one didn't have to hack their way out of the problem for each installation.

Maybe it would be a sound option to :
- integrate the logging to Package Logs
- allow not generating any log at all (just have a checkbox like is the case for squid for instance)
- facilitate the use of rotatelogs with a GUI wrapper (and a cron job to remove older logs)

Actions #1

Updated by Stéphane Lapie over 9 years ago

+1

Ended up having to install a local crontab to avoid log overflowing, which is totally sub-optimal and non-reproductible :

0 0 1,15 * * rm /var/log/httpd*.log; /usr/local/etc/rc.d/apache_mod_security.sh restart

I am considering modifying the Apache package to generate all logs with Apache rotatelogs, but I would still need eventually weeding older logs after a time.

Actions #2

Updated by Chris Buechler almost 8 years ago

  • Status changed from New to Closed

package has been removed

Actions

Also available in: Atom PDF