Extend log rotation for ModSecurity and app logs
This commit is contained in:
30
install.sh
30
install.sh
@@ -2953,7 +2953,7 @@ setup_scheduler_cron() {
|
|||||||
log "Laravel scheduler configured - SSL auto-renewal and backups will run automatically"
|
log "Laravel scheduler configured - SSL auto-renewal and backups will run automatically"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Setup logrotate for user domain logs
|
# Setup logrotate for user domain logs and Jabali services
|
||||||
setup_logrotate() {
|
setup_logrotate() {
|
||||||
header "Setting Up Log Rotation"
|
header "Setting Up Log Rotation"
|
||||||
|
|
||||||
@@ -2972,9 +2972,35 @@ setup_logrotate() {
|
|||||||
invoke-rc.d nginx rotate >/dev/null 2>&1
|
invoke-rc.d nginx rotate >/dev/null 2>&1
|
||||||
endscript
|
endscript
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# ModSecurity audit log (when enabled)
|
||||||
|
/var/log/nginx/modsec_audit.log /var/log/modsec_audit.log {
|
||||||
|
daily
|
||||||
|
missingok
|
||||||
|
rotate 14
|
||||||
|
compress
|
||||||
|
delaycompress
|
||||||
|
notifempty
|
||||||
|
create 0640 www-data adm
|
||||||
|
sharedscripts
|
||||||
|
postrotate
|
||||||
|
invoke-rc.d nginx rotate >/dev/null 2>&1
|
||||||
|
endscript
|
||||||
|
}
|
||||||
|
|
||||||
|
# Jabali application logs
|
||||||
|
/var/www/jabali/storage/logs/*.log {
|
||||||
|
daily
|
||||||
|
missingok
|
||||||
|
rotate 14
|
||||||
|
compress
|
||||||
|
delaycompress
|
||||||
|
notifempty
|
||||||
|
create 0640 www-data www-data
|
||||||
|
}
|
||||||
LOGROTATE
|
LOGROTATE
|
||||||
|
|
||||||
log "Log rotation configured for user domain logs"
|
log "Log rotation configured for Jabali logs (domains, ModSecurity, app logs)"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Setup SSL certificates for panel and mail services
|
# Setup SSL certificates for panel and mail services
|
||||||
|
|||||||
Reference in New Issue
Block a user