502 Bad Gateway error on Plesk when using Comodo ModSecurity ruleset

Started by Suhitha, Sep 26, 2025, 03:15 AM

Previous topic - Next topic

Suhitha

Question: 502 Bad Gateway error on Plesk when using Comodo ModSecurity ruleset


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

1.Connect to the Plesk server via SSH.

2.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