Nginx support with mod_security on almalinux 9

Hi,
I have currently install nginx from the official repository of alma and php is from remi repository. I have tried the command yum install mod_security but I dont see the dependencies support for nginx. So I am not sure how to get it working with nginx with mod_security on alma linux 9. What I have seen is this links so far How to Install ModSecurity 3 with Nginx on AlmaLinux 9 | by ComputingPost | Medium. So must I follow this method of compiling it manually and going back to the nginx from the nginx repo?

EPEL has package nginx-mod-modsecurity

Hi Jlehtone,
Yes I managed to install it. Any correct link for the setup process . Will this page be relevant https://rhel.pkgs.org/9/epel-x86_64/nginx-mod-modsecurity-1.0.3-8.el9.x86_64.rpm.html. From this I found the settings in /etc/nginx/modsecurity.conf. So what is best settings to further enable it.

modsecurity_rules '
          SecRuleEngine On
          SecDebugLog /tmp/modsec_debug.log
          SecDebugLogLevel 9
          SecRuleRemoveById 10
        ';

Can you suggest any good settings for the hardening part ?

I have never used nginx nor modsecurity, so can’t help with that.

Hi Jlethone,
No issue let me explore further on this. Thank you.