nginx modsecurity on Debian 8

Thierry lenaigst at
Wed Dec 23 12:21:50 UTC 2015


A bit lost ...
I know nothing concerning nginx, I am more confortable with Apache2.
I am using an email server who is using nginx on debian 8.
I would need to install modsecurity as module.
I have understood that I need to compile from the working directory of 
nginx ....

./configure --add-module=/opt/ModSecurity-nginx

But how to deal with it if nginx as been installed from binary (debian 
package) ?

I have followed these instructions:

 $ sudo dnf install gcc-c++ flex bison curl-devel curl yajl yajl-devel GeoIP-devel doxygen 
$ cd /opt/ 
$ git clone 
$ cd ModSecurity 
$ git checkout libmodsecurity 
$ sh 
$ ./configure 
$ make 
$ make install 
$ cd /opt/ 
$ git clone 
$ cd /opt/Modsecurity-nginx 
$ git checkout experimental 
$ cd /opt/ 
$ wget 
$ tar -xvzf nginx-1.9.2.tar.gz 
$ yum install zlib-devel 
$ ./configure --add-module=/opt/ModSecurity-nginx

Everything went fine until the last ./configure .... 
I  didn't  apply  what's  between  " *** " because my nginx server is 
already installed and working.

Any ideas ?

 Thierry                          e-mail : lenaigst at

More information about the nginx mailing list