• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

After mod security logrotate new log is empty

josie3333

New Pleskian
Plesk 12 on Centos 6.5

I added the following to my /etc/logrotate.conf

/var/log/modsec_audit.log {
missingok
daily
rotate 4
compress
}

I'm not exactly sure if the above is the correct syntax, but the result was that two days later my current modsec_audit.log was Gzipped and a new modsec_audit.log was created.
The problem is that nothing was logged to this new file.

From the Plesk 12 control panel I turned off mod security and then turned it back on again and hey presto, the new logfile started to log events.

This leaves the problem of why nothing was recorded when the file was created.

Can anyone advise
 
Last edited:
You can try restarting apache

service httpd restart

Don't worry I'm having lots of issues with the mod security myself. Trying to test and ensure it is actually working and keeping it from logging TOO many events
 
Depending on your system, please add this lines to your logrotate definition for mod_security:

Code:
...
    postrotate
       /etc/init.d/apache2 reload > /dev/null 2>&1 || true
    endscript

Please adjust the reload - command to YOUR needs on your system, because some operating systems have different names for the apache2 and it's init - scripts.
 
Back
Top