Plesk ModSecurity Failed to update ruleset. modsecurity_ctl failed
Plesk(Plesk12.5.30) I got the following error.
Error: Failed to update ModSecurity ruleset.
modsecurity_ctl failed: HTTP Error 403: Forbidden
Unable to download tortix rule set
Turn off ModSecurity and then turn it back on.
Once I turned it off and then on, the error disappeared. The ruleset is updated at midnight, so I checked the next morning and got the same error message again.
Uninstall and reinstall ModSecurity.
The error message was still there.
If I turn it off and on, the error message disappears. I checked again the next morning and got the same error message. But this time it was a 404.
Error: Failed to update ModSecurity ruleset.
modsecurity_ctl failed: HTTP Error 404: Not Found
Unable to download tortix rule set
Found information in Plesk Help Center
Execute as shown.
# cd /usr/local/psa/lib/modules/python/pylib-modsec-atomic
# cp -a plesk_atomic.py plesk_atomic.py.original
# vi plesk_atomic.py
Rewrite the relevant part of plesk_atomic.py as follows
(before)
AUM_PLESK_INSTALLER_NAME = "aum-plesk-installer"
AUM_PLESK_INSTALLER_URL = "http://www.atomicorp.com/installers/" + AUM_PLESK_INSTALLER_NAME
(after)
AUM_PLESK_INSTALLER_NAME = "aum"
AUM_PLESK_INSTALLER_URL = "https://updates.atomicorp.com/installers/" + AUM_PLESK_INSTALLER_NAME
Remove pyc. It will be generated automatically.
# rm plesk_atomic.pyc
Then I turned ModSecurity off and on.
When I checked the next morning, there was no error message. It seems to have returned to normal.
The problem seemed to go away in about a week.
The error occurred again, so I changed the settings back. There seemed to be no problem with the original settings.
In other words, this was a one-time problem and a temporary fix.