I thought that it should be in /etc/logrotate.d/mod_security
I just looked in that directory and modsecurity isnt there…so where is it normally in virtualmin?
I installed this from within Virtualmin, should not Virtualmin automatically setup modsecurity log rotation?
Am i right to manually create the missing mod_security file with the following content…
vi /etc/logrotate.d/mod_security
/var/log/modsec_audit.log {
daily
rotate 7
missingok
compress
postrotate
/sbin/service httpd reload > /dev/null 2>/dev/null || true
endscript
}
I think i need to change “service httpd reload” to “service apache2 restart”? (i am running Debian9 not centos7)
Are there any other changes i need to make to the above file for use with Virtualmin?