From b749ae3d67b9c7ed9ebc57840c760a0a84972b03 Mon Sep 17 00:00:00 2001 From: Eli Flanagan Date: Tue, 2 Jun 2015 16:35:54 -0400 Subject: [PATCH] clarifying the nginx compiling documentation per issue 603 --- Reference-Manual.mediawiki | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Reference-Manual.mediawiki b/Reference-Manual.mediawiki index 79051e7..060af40 100644 --- a/Reference-Manual.mediawiki +++ b/Reference-Manual.mediawiki @@ -190,14 +190,22 @@ You should now have ModSecurity 2.x up and running. = Installation for NGINX = The extensibility model of the nginx server does not include dynamically loaded modules, thus ModSecurity must be compiled with the source code of the main server. Since nginx is available on multiple Unix-based platforms (and also on Windows), for now the recommended way of obtaining ModSecurity for nginx is compilation in the designated environment. == Manually Installing ModSecurity Module on NGINX == -The first step in obtaining nginx server with built-in ModSecurity module is building of standalone library containing full ModSecurity with a set of intermediate API (this layer is a common base for IIS version, nginx version, and server-less command line version of ModSecurity). It is recommended to follow the general steps of preparing build environment for ModSecurity and then follow with two simple commands +The first step in obtaining nginx server with built-in ModSecurity module is building of standalone library containing full ModSecurity with a set of intermediate APIs (this layer is a common base for IIS version, nginx version, and server-less command line version of ModSecurity). First prepare the build environment for ModSecurity and then follow the installation steps below. +The standalone ModSecurity is located at https://www.modsecurity.org/download.html. +=== Preinstallation Steps === +To build the standalone module from source on a GNU/Linux platform, you need to install the standard and development packages for apache and prce. For example: +
+# RHEL/CentOS style install
+sudo yum install httpd httpd-devel pcre pcre-devel
+
+For details on why compiling ModSecurity for nginx requires these packages, see [https://github.com/SpiderLabs/ModSecurity/issues/603 | issue 603]. === Installation Steps === 1 - Compile standalone module:
 ~/mod_security$ ./configure --enable-standalone-module --disable-mlogc
 ~/mod_security$ make
 
- +Note that the path and name of the mod_security folder will differ based on what version and where you download the tarball from [https://www.modsecurity.org/download.html modsecurity.org]. 2 - Once the standalone library is built successfully, one can follow with building the nginx server, following the steps from the nginx build tutorial:
 ~/nginx-1.2.0$ ./configure --add-module=../mod_security/nginx/modsecurity