• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved What is the best way to configure NGINX ModSecurity?

othmaqsa

Regular Pleskian
Server operating system version
Ubuntu 20.04.5 LTS
Plesk version and microupdate number
18.0.49
Hello,

What is the best way to configure Modsecurity ? I use only NGINX.

Thank you.
 
Please check the documentation here:
Hello,

Thank you for your message.

I've read this before, but the confusion is that in the documentation:
Apache (ModSecurity 2.9) (recommended).
Nginx (ModSecurity 3.0).
Note: Switching to Nginx (ModSecurity 3.0) may affect your existing applications. We recommend trying ModSecurity 3.0 out on a test server before switching your production environment to that version.


In my case, I use only NGINX only (proxy mode disabled), I need to choose the recommended setting or go Nginx (ModSecurity 3.0) ?
 
If you haven't used ModSecurity before then you should go for ModSecurity 3.0 with nginx and run it in "Detection Mode" only for a while and analyse the logs it produces.

Once you're sure that no legitimate requests would be blocked then you can switch to "On" (blocking mode).
 
If you haven't used ModSecurity before then you should go for ModSecurity 3.0 with nginx and run it in "Detection Mode" only for a while and analyse the logs it produces.

Once you're sure that no legitimate requests would be blocked then you can switch to "On" (blocking mode).
Got it, since it's the first time I use ModSecurity, I'll enable ModSecurity 3.0 with nginx.

Another question: Can I see the Logs with the option Detection Mode ? If yes, where can I see it ?
 

Have a look at the log files section here
@Monty Last questions please: I would like to know, please, the average consumption (CPU/RAM) ? In general, can ModSecurity cause cpu/ram spikes during use?
 
ModSecurity will have a CPU impact, yes. But with a "normal" amount of rules this impact should be very small, close to negligible. To see the impact, record your CPU/RAM usage before activating ModSecurity and then compare it with ModSecurity enabled.

For further tuning and optimization of ModSecurity: ModSecurity Performance Recommendations
 
Back
Top