Apache/ModSecurity custom error page

Solution 1:

Have you tried the combination of the two?:

SecDefaultAction "phase:1,log,auditlog,deny,status:503"
SecDefaultAction "phase:2,log,auditlog,deny,status:503"

Note you can different default actions per phase like above.

Note also that some rule sets (e.g. OWASP CRS) also set these default actions, and Kay also need then set a certain way if using anomaly scoring or immediate blocking.