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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    670
    Likes Received:
    11
    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?
     
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,615
    Likes Received:
    51
    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
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    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.
     

Share This Page