Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Sep 2003
    Posts
    149

    Default modsec_audit.log rotates clears every hour

    Hi,

    modsec_audit.log is currently clearing itself every hour in /usr/local/apache/logs, how do I change this so that it's rotated properly like most lost in /var/log?

  2. #2
    Member
    Join Date
    Apr 2008
    Location
    sanctum sanctorum
    Posts
    152

    Default

    Look in /etc/cron.hourly. Remove modsecparse.pl which causes the symptom you are seeing. It parses (not very well) modsec_audit.log and inserts contents into DB modsec, then clears the log file.

    Unfortunately, next time you build apache it will return so you need to keep an eye on it. I could not find a way to disable it. You may want to keep a copy as the credentials for DB modsec are in there.

    Edit: after removing modsecparse.pl, modsec_audit.log will not be included in Main >> Service Configuration >> Apache Configuration >> Apache Log Rotation Configuration list so it is not rotated. A workaround is to rename modsec_audit.log to something else in modsec2.conf. After that it appears in the list and rotates normally if selected. Sadly, modsec2.conf has a tendency to be overwritten as well.
    Last edited by thobarn; 04-06-2009 at 08:54 AM. Reason: Added last paragraph

  3. #3
    Member
    Join Date
    Sep 2003
    Posts
    149

    Default

    Thanks I'd since posting found that cron, I will create a cron to remove it daily for when apache is built.

Similar Threads & Tags
Similar threads

  1. Logging out of Cpanel clears cookies and cache?
    By some_guy in forum New User Questions
    Replies: 0
    Last Post: 07-26-2010, 03:13 PM
  2. Deleting an email account clears all filters?
    By WindyT in forum E-mail Discussions
    Replies: 0
    Last Post: 01-19-2010, 10:16 PM
  3. A 3 hour update....a 3 hour update (upcp)
    By BianchiDude in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 10-17-2009, 07:54 PM
  4. Why does the modsec_audit log truncate so often?
    By BianchiDude in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 04-03-2008, 03:08 PM
  5. How CPanel Rotates Domlogs?
    By thewird in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 02-11-2008, 08:19 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube