Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

modsec_audit.log is 1.4GB

Discussion in 'General Discussion' started by postcd, Oct 7, 2017.

  1. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    689
    Likes Received:
    14
    Trophy Points:
    68
    Hello, on WHM server v66.0.24, /usr/local/apache/logs/modsec_audit.log is 1.4GB which seems quite big to me.

    first entry in the file is: [28/Feb/2017

    cat /etc/logrotate.d/modsecurity_logs
    Please kindly what to check to fix it?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,664
    Likes Received:
    69
    Trophy Points:
    203
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    Make sure you have a
    include /etc/logrotate.d
    statement

    in your /etc/logrotate.conf

    run
    logrotate -f /etc/logrotate.conf
    see if it rotates or there is an error
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,633
    Likes Received:
    1,787
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    In addition to the previous post, check to ensure the following entries exist in the /etc/logrotate.d/modsecurity_logs file:

    Code:
    /usr/local/apache/logs/modsec_audit.log {
        rotate 15
        size=300M
        missingok
        compress
        postrotate
            /usr/local/cpanel/scripts/restartsrv_httpd 2> /dev/null > /dev/null || true
        endscript
    }
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice