linode / linode/docs

Securing Nginx With ModSecurity

Open
#7,314 0 comments 0 reactions 1 assignee View on GitHub

@Rajakavitha1 is already working on this.

Since Jul 28, 2025.

Dominant language
Python
Stars
1.4k
Forks
1.2k
Avg merge
9m
Merged PRs (30d)
1

Description

Guide: https://www.linode.com/docs/guides/securing-nginx-with-modsecurity

Thanks for the wonderful guide. I was able to use it on Ubuntu 24.04.2 on an AWS EC2 instance with a few changes to the dependencies:

Installing dependencies - omit packages that are deprecated in Ubuntu24

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 libssl-dev libtool libxml2 libxml2-dev libyajl-dev locales
lua5.3-dev pkg-config wget zlib1g-dev libgd-dev

Before ./configure in /opt/Modsecurity , do sudo apt install libpcre2-dev
https://unix.stackexchange.com/questions/635758/local-installation-of-pcre2-not-detected-while-installing-r-4-0-4-from-source

Before the giant nginx configure step, do sudo apt-get install libxslt-dev
https://stackoverflow.com/questions/57415360/configure-error-the-http-xslt-module-requires-the-libxml2-libxslt-libraries

Before the next make step: sudo apt-get install libperl-dev

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.