Paper Lantern for cPanel accounts is being retired this year. Find out more »
cPanel & WHM Version 102 has been released, and brings a slew of great updates. Take a look at what is included, and then upgrade today!

Allow to clear/rotate logs at Mod Security > Hits List

Marcelo Pedra shared this idea 5 years ago
Open Discussion

I, as a sysadmin, every time I have to browse this list and made a config change or rule suppression, would really appreciate if this screen could be reset, or cleared, or at least enforce log rotation for this in order to have a clear starting point to monitor from. A simple "Clear log" or "Reset log" button will do the trick.

Hope you can take it into consideration.

Best regards

Replies (2)


Currently you can do this, albeit with three steps by altering the default time frame logs are kept in tweak settings:

WHM -> Tweak Settings -> "The number of days to keep records of ModSecurity™ rule hits. "

and then run the following clean up routine:


...and then revert your tweak settings.

It would be great if that script took arguments so you could just do it in a single call from the CLI but thats how we're currently doing it when needed.


with this you force a rotation of the log:

logrotate -vf /etc/logrotate.d/mod_security

Leave a Comment
Attach a file