Nginx, Modsecurity & Imunify360 Error

Rockyuk

Verified User
Joined
Aug 3, 2020
Messages
59
Hello Everyone,
My nginx has stopped with the following error
Code:
2023/03/02 00:02:51 [emerg] 97663#0: "modsecurity_rules_file" directive Rules error. File: /etc/modsecurity.d/000_i360_0.conf. Line: 82. Column: 254. Expecting a variable, got:  :  SCRIPT_USERNAME}||T:APACHE||',phase:2,deny,status:406,t:none,t:lowercase,severity:2,tag:'service_i360custom'" in /etc/nginx/nginx-modsecurity-enable.conf:2

Any ideas please?

Thanks
 
Line: 82. Column: 254. Expecting a variable, got: : SCRIPT_USERNAME}||T:APACHE||'
Hello.
It explains itself, there is an issue on line 82 of the 000_i360_0.conf file.

I'm no scripter and I could be wrong, but seems to me that in the first part of that line:
SCRIPT_USERNAME}
should be:
{SCRIPT_USERNAME}

Try and change it like this and see if that helps.
If not, then i don't know except that something in that line is incorrect. Or something in nginx-modsecurity-enable.conf.
 
Hello Everyone,
My nginx has stopped with the following error
Code:
2023/03/02 00:02:51 [emerg] 97663#0: "modsecurity_rules_file" directive Rules error. File: /etc/modsecurity.d/000_i360_0.conf. Line: 82. Column: 254. Expecting a variable, got:  :  SCRIPT_USERNAME}||T:APACHE||',phase:2,deny,status:406,t:none,t:lowercase,severity:2,tag:'service_i360custom'" in /etc/nginx/nginx-modsecurity-enable.conf:2

Any ideas please?

Thanks
The easiest fix for this issue would be contacting the CloudLinux team, they are pretty good in Support. or try what @Richard G Suggested above
 
I will do once they reply its been a while now. I think I may have two versions of modsecurity installed 2.97 and 3. How do I remove version 2.97 to see if it may be conflicting?
 
Ok, I spoke to CloudLinux and after all the back and forth it is not compatible with apache & nginx. You will need apache or litespeed for it to work.
 
Back
Top