# Nginx and WAF on Rocky Linux 9.2

**URL:** <https://forums.rockylinux.org/t/nginx-and-waf-on-rocky-linux-9-2/11902>\
**Category:** Rocky Linux Help & Support\
**Tags:** rocky-linux-9\
**Created:** [November 19, 2023, 8:45am UTC](https://forums.rockylinux.org/t/nginx-and-waf-on-rocky-linux-9-2/11902 "2023-11-19T08:45:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bzc0fq](https://avatars.discourse-cdn.com/v4/letter/b/b77776/32.png) [@bzc0fq](https://forums.rockylinux.org/u/bzc0fq)\
**Post date:** [November 19, 2023, 8:45am UTC](https://forums.rockylinux.org/t/nginx-and-waf-on-rocky-linux-9-2/11902/1 "2023-11-19T08:45:46Z")

</div>

Hi,

I would like to migrate from Apache to Nginx… Nginx installation process looks straightforward, but I do not know how to install WAF. I use mod\_security in Apache and would like to use it as well on Nginx if it makes sense…

Since I do not have experience with Nginx, could anyone give me some advises on what WAF to choose (what is the most popular) and point me to valid installation howto/docs/manual…

Many thanks

---

<div class="post-metadata">

**Author:** ![sspencerwire](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@sspencerwire](https://forums.rockylinux.org/u/sspencerwire)\
**Post date:** [November 19, 2023, 6:54pm UTC](https://forums.rockylinux.org/t/nginx-and-waf-on-rocky-linux-9-2/11902/2 "2023-11-19T18:54:00Z")

</div>

Hi @bzc0fq ,

Atomicorp has an implementation for this in both their ASL (commercial product) and Atomic (OSS) repositories. Take a look a their doc on this [here](https://wiki.atomicorp.com/wiki/index.php/Nginx). There is another player out there too, Coraza.

Thanks,  
Steve

---

<div class="post-metadata">

**Author:** ![bzc0fq](https://avatars.discourse-cdn.com/v4/letter/b/b77776/32.png) [@bzc0fq](https://forums.rockylinux.org/u/bzc0fq)\
**Post date:** [November 23, 2023, 11:15am UTC](https://forums.rockylinux.org/t/nginx-and-waf-on-rocky-linux-9-2/11902/3 "2023-11-23T11:15:15Z")

</div>

Thanks Steve,

I was unable to download software from Atomic repository, it looks it is not there any longer.  
Also it seems that Coraza is in development stage yet - not in production.

Could anyone please advise on what is working WAF solution for nginx?  
There must be one - WAF is a basic thing… I guess…

---

<div class="post-metadata">

**Author:** ![iwalker](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/iwalker/32/2599_2.png) [@iwalker](https://forums.rockylinux.org/u/iwalker)\
**Post date:** [November 23, 2023, 11:35am UTC](https://forums.rockylinux.org/t/nginx-and-waf-on-rocky-linux-9-2/11902/4 "2023-11-23T11:35:54Z")

</div>

Maybe this will help: [GitHub - wallarm/awesome-nginx-security: 🔥 A curated list of awesome links related to application security related to the environments with NGINX or Kubernetes Ingres Controller (based on NGINX)](https://github.com/wallarm/awesome-nginx-security)

Nginx + WAF is not unique to Rocky, so I just googled “nginx waf”. How you then implement just requires editing the appropriate nginx config file or whatever, which will generally be the same for most distros, just the location to the config file will be different for EL-based distros, than like Debian/Ubuntu, etc.

There may even not be packages available, in which case means packaging yourself or compiling and installing with the version of nginx you are using.

There is also this: [GitHub - SpiderLabs/ModSecurity-nginx: ModSecurity v3 Nginx Connector](https://github.com/SpiderLabs/ModSecurity-nginx) modsecurity for nginx.

But probably, even easier is:

```auto
dnf install nginx-mod-modsecurity

```

which is in EPEL repository. You can use dnf to search for packages, eg:

```auto
dnf list nginx*

```

or:

```auto
dnf search nginx
dnf search modsecurity

```

for How’To’s I suggest search Google for them.

---

<div class="post-metadata">

**Author:** ![bzc0fq](https://avatars.discourse-cdn.com/v4/letter/b/b77776/32.png) [@bzc0fq](https://forums.rockylinux.org/u/bzc0fq)\
**Post date:** [November 26, 2023, 3:58pm UTC](https://forums.rockylinux.org/t/nginx-and-waf-on-rocky-linux-9-2/11902/5 "2023-11-26T15:58:45Z")

</div>

Thank you very much for the links to the documentation. It helped me a lot. I have uploaded owasp-modsecurity-crs-3.0.2…  
I will test the installation later this week…  
Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/1X/91b7219eec10e30013422e4df76c1d898711a5d5.svg) [@system](https://forums.rockylinux.org/u/system)\
**Post date:** [January 25, 2024, 3:59pm UTC](https://forums.rockylinux.org/t/nginx-and-waf-on-rocky-linux-9-2/11902/6 "2024-01-25T15:59:05Z")

</div>

Closed on January 25, 2024, 3:59pm UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
