Issue With ModSecurity in Cyberpanel v2.4 build 4

Hello

I updated Cyberpanel to v2.4 build 4 on Ubuntu 22.04. I had ModSecurity turned ON in Cyberpanel. I also have CPGuard installed on my server. After the update, I could still login to Cyberpanel but all my wordpress sites gave a 520 error and not accessible.

I asked CPGuard team to check, and this is what they found:
This seems to be an issue with the OLS ModSec module and it is not recognizing the ModSec module…given below is an example error:
modsecurity_rules_file /usr/local/lsws/conf/modsec.conf failed, ret -1, reason: ‘Rules error. File: <>. Line: 10. Column: 56. Invalid input: modsecurity_rules_file /usr/local/lsws/conf/modsec.conf’.
It appears the issue is coming from the OpenLiteSpeed ModSecurity module, as it is failing to load any ModSec rules. This is an error with OLS + ModSecurity.
Please contact CyberPanel support to have this fixed on the server.

Can Cyberpanel support team have a look at this issue?

FYI, I also tried a fresh install of Cyberpanel on Ubuntu 22.04 with dummy wordpress site on it. As soon as I installed and turned on ModSecurity from inside Cyberpanel, my sites will throw 520 error.

Hope any support team can help

Thanks

Same issue here after upgrading to CyberPanel 2.4.4.

ModSecurity is enabled and rules are loaded, but requests are never intercepted.
Tested with inline SecRule in vHost and server config, rules file, audit logs on /tmp, and direct 127.0.0.1 requests.

No 403 responses, audit logs always empty.
This looks like ModSecurity is not hooked into the request flow on OpenLiteSpeed OSS.