Limiting modsec_audit.log On Plesk

The mod_security implementation on Plesk 12 is a great new feature but we’ve noticed a tendency to accumulate very large log files at:

/var/log/modsec_audit.log

This happens on CentOS but not sure if it’s a problem on other distributions.

One way to reduce the logging is to add this line:

to:

Plesk -> Tools & Settings -> Web Application Firewall -> Settings -> Custom directives

Another good step is to add log rotation for the file by creating:

/etc/logrotate.d/modsec

with:

 

Have a project or a problem?

Talk with a senior engineer for practical recommendations—no obligation.

Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

Categories

Get a free consultation from Reliable Penguin

Submit the form—or for immediate service call 866-649-7984.