From de7db6118ea5c08fce494b3eb7b9c85b85d0eb79 Mon Sep 17 00:00:00 2001 From: Rajakavitha Kodhandapani Date: Thu, 19 Mar 2026 18:13:21 +0530 Subject: [PATCH 1/2] Update index.md added the packages that are required and a note about the file that needs to be enabled --- .../basics/securing-nginx-with-modsecurity/index.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/guides/security/basics/securing-nginx-with-modsecurity/index.md b/docs/guides/security/basics/securing-nginx-with-modsecurity/index.md index 39856f112cd..4c5cb763f06 100644 --- a/docs/guides/security/basics/securing-nginx-with-modsecurity/index.md +++ b/docs/guides/security/basics/securing-nginx-with-modsecurity/index.md @@ -33,7 +33,7 @@ In order to install and configure ModSecurity, you need to have a Linux server w For instructions, see our guide on [How to Install NGINX on Ubuntu 18.04 LTS](/docs/guides/how-to-install-nginx-ubuntu-18-04/). Installation instructions for several other Linux distributions are also accessible from this guide. {{< note >}} -This demonstration has been performed on Ubuntu 18.04. However, all techniques demonstrated are distribution agnostic with the exception of package names and package managers. +This demonstration has been performed on Ubuntu 24.04. However, all techniques demonstrated are distribution agnostic with the exception of package names and package managers. {{< /note >}} ## Downloading & Building ModSecurity @@ -48,8 +48,8 @@ To begin the installation process, follow the steps outlined below: sudo apt-get install bison build-essential ca-certificates curl dh-autoreconf doxygen \ flex gawk git iputils-ping libcurl4-gnutls-dev libexpat1-dev libgeoip-dev liblmdb-dev \ - libpcre3-dev libpcre++-dev libssl-dev libtool libxml2 libxml2-dev libyajl-dev locales \ - lua5.3-dev pkg-config wget zlib1g-dev zlibc libxslt libgd-dev + libpcre3-dev libpcre2-dev libssl-dev libtool libxml2 libxml2-dev libyajl-dev locales \ + lua5.3-dev pkg-config wget zlib1g-dev libxslt1-dev libgd-dev libperl-dev 1. Ensure that git is installed: @@ -238,6 +238,10 @@ Now that you have configured ModSecurity to work with Nginx, you must enable Mod modsecurity on; modsecurity_rules_file /etc/nginx/modsec/main.conf; + {{< note >}} + Edit the file that is actually symlinked in `sites-enabled/`. Verify with `ls -la /etc/nginx/sites-enabled/`. + {{< /note >}} + Here is an example configuration file that includes the above lines: {{< file "/etc/nginx/sites-available/default" nginx >}} From 36acdf71f44f8e09054fcdf7bbab418778c2aecf Mon Sep 17 00:00:00 2001 From: Rajakavitha Kodhandapani Date: Thu, 19 Mar 2026 18:22:58 +0530 Subject: [PATCH 2/2] Update index.md fix blueberry --- .../security/basics/securing-nginx-with-modsecurity/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/security/basics/securing-nginx-with-modsecurity/index.md b/docs/guides/security/basics/securing-nginx-with-modsecurity/index.md index 4c5cb763f06..73f88c66d4b 100644 --- a/docs/guides/security/basics/securing-nginx-with-modsecurity/index.md +++ b/docs/guides/security/basics/securing-nginx-with-modsecurity/index.md @@ -241,7 +241,7 @@ Now that you have configured ModSecurity to work with Nginx, you must enable Mod {{< note >}} Edit the file that is actually symlinked in `sites-enabled/`. Verify with `ls -la /etc/nginx/sites-enabled/`. {{< /note >}} - + Here is an example configuration file that includes the above lines: {{< file "/etc/nginx/sites-available/default" nginx >}}