Securing Nginx With ModSecurity
@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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.