502 Bad Gateway error on Plesk when using Comodo ModSecurity ruleset

Started by Suhitha, Aug 09, 2025, 04:56 AM

Previous topic - Next topic

Suhitha


Symptoms

  • All websites show a 502 Bad Gateway error
  • Switching to the Atomic Standard ruleset resolves the problem
  • The Plesk UI shows the following error message:

      AH00526: Syntax error on line 6035 of /etc/httpd/conf/modsecurity.d/rules/comodo_free/30_Apps_OtherApps.conf: Error creating rule: Error compiling pattern (offset 4): invalid range in character class       

Cause

The mod_security package installed from the Atomic repository is not fully compatible with the current Comodo rule set.

Resolution


  • Connect to the Plesk server via SSH.
  • Execute the command to replace the ModSecurity package with the version provided by Plesk:

# dnf swap mod_security mod_security --enablerepo=PLESK_18_0_70-extras --disablerepo=atomic --skip-broken