Issue ModSecurity 3.0 + OWASP | Geo2ip lite

othmaqsa

Regular Pleskian
Server operating system version
Ubuntu 20.04.6 LTS
Plesk version and microupdate number
Version 18.0.51
Hello,

For the the Workaround II, when I try to save the custom directives in ModSecurity, this error occur:

Invalid ModSecurity configuration: nginx: [emerg] "modsecurity_rules_file" directive Rules error. File: /etc/nginx/modsecurity.d/main.conf. Line: 6. Column: 44. Expecting an action, got: Include /etc/nginx/modsecurity.d/rules.conf in /etc/nginx/conf.d/modsecurity.conf:6 nginx: configuration file /etc/nginx/nginx.conf test failed

Line: 6. Column: 44 : There is nothing wrong here


How to solve this ?
 

Attachments

  • Screenshot from 2023-04-04 11-03-57.png
    Screenshot from 2023-04-04 11-03-57.png
    27.7 KB · Views: 8
Same error:

Code:
Некоректна конфігурація ModSecurity: nginx: [emerg] "modsecurity_rules_file" directive Rules error. File: /etc/nginx/modsecurity.d/main.conf. Line: 6. Column: 44. Expecting an action, got: Include /etc/nginx/modsecurity.d/rules.conf in /etc/nginx/conf.d/modsecurity.conf:6 nginx: configuration file /etc/nginx/nginx.conf test failed

trying to block country using this article How to block or whitelist specific countries through Plesk? - Support Cases from Plesk Knowledge Base

Plesk Obsidian 18.0.66 #2
 

Attachments

  • Screenshot_23.png
    Screenshot_23.png
    68.9 KB · Views: 2
Hi, @Dmytro . What I can suggest is trying to uninstall ModSecurity and then re-installing it. Also, you might try switching "Run rules on" from Nginx to Apache or vice versa.
 
Back
Top