<div dir="ltr">append  the configure argument you already mentioned  ./configure --add-module=/opt/ModSecurity-nginx with the <div><br></div><div>--with-cc-opt='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' --with-ld-opt=-Wl,-z,relro --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_spdy_module --with-http_sub_module --with-http_xslt_module --with-mail --with-mail_ssl_module --add-module=/tmp/buildd/nginx-1.6.2/debian/modules/nginx-auth-pam --add-module=/tmp/buildd/nginx-1.6.2/debian/modules/nginx-dav-ext-module --add-module=/tmp/buildd/nginx-1.6.2/debian/modules/nginx-echo --add-module=/tmp/buildd/nginx-1.6.2/debian/modules/nginx-upstream-fair --add-module=/tmp/buildd/nginx-1.6.2/debian/modules/ngx_http_substitutions_filter_module<br></div><div><br></div><div><br></div><div>##</div><div><br></div><div>One problem I see here is that you need to place the modules added there in their exact path like for example /tmp/buildd/nginx-1.6.2/debian/modules/nginx-upstream-fair .Otherwise you will have to modify those path accordingly. you need to install build deps for nginx too</div><div><br></div><div>Also you might be able to use 1.8.0 stable version </div><div><br></div><div>Follow - <a href="https://www.digitalocean.com/community/tutorials/how-to-add-ngx_pagespeed-module-to-nginx-in-debian-wheezy">https://www.digitalocean.com/community/tutorials/how-to-add-ngx_pagespeed-module-to-nginx-in-debian-wheezy</a> . The difference is you are adding mod_sec instead of pagespeed .</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 23, 2015 at 6:14 PM, Thierry <span dir="ltr"><<a href="mailto:lenaigst@maelenn.org" target="_blank">lenaigst@maelenn.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What I have ...<br>
Could you please explain to me what do I have to do ? I do not understand ...<br>
Sorry<br>
<br>
nginx version: nginx/1.6.2<br>
TLS SNI support enabled<br>
configure arguments: --with-cc-opt='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' --with-ld-opt=-Wl,-z,relro --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_spdy_module --with-http_sub_module --with-http_xslt_module --with-mail --with-mail_ssl_module --add-module=/tmp/buildd/nginx-1.6.2/debian/modules/nginx-auth-pam --add-module=/tmp/buildd/nginx-1.6.2/debian/modules/nginx-dav-ext-module --add-module=/tmp/buildd/nginx-1.6.2/debian/modules/nginx-echo --add-module=/tmp/buildd/nginx-1.6.2/debian/modules/nginx-upstream-fair --add-module=/tmp/buildd/nginx-1.6.2/debian/modules/ngx_http_substitutions_filter_module<br>
<div class="HOEnZb"><div class="h5"><br>
> nginx -V will show configure arguments. You need to add mod_sec at<br>
> the beginning of whatever is in there. <br>
<br>
<br>
<br>
<br>
> On Wed, Dec 23, 2015 at 5:51 PM, Thierry <<a href="mailto:lenaigst@maelenn.org">lenaigst@maelenn.org</a>> wrote:<br>
<br>
> Hi,<br>
><br>
>  A bit lost ...<br>
>  I know nothing concerning nginx, I am more confortable with Apache2.<br>
>  I am using an email server who is using nginx on debian 8.<br>
>  I would need to install modsecurity as module.<br>
>  I have understood that I need to compile from the working directory of<br>
>  nginx ....<br>
><br>
>  ./configure --add-module=/opt/ModSecurity-nginx<br>
><br>
>  But how to deal with it if nginx as been installed from binary (debian<br>
>  package) ?<br>
><br>
>  I have followed these instructions:<br>
><br>
>   $ sudo dnf install gcc-c++ flex bison curl-devel curl yajl yajl-devel GeoIP-devel doxygen<br>
>  $ cd /opt/<br>
>  $ git clone <a href="https://github.com/SpiderLabs/ModSecurity" rel="noreferrer" target="_blank">https://github.com/SpiderLabs/ModSecurity</a><br>
>  $ cd ModSecurity<br>
>  $ git checkout libmodsecurity<br>
>  $ sh build.sh<br>
>  $ ./configure<br>
>  $ make<br>
>  $ make install<br>
>  $ cd /opt/<br>
>  $ git clone <a href="https://github.com/SpiderLabs/ModSecurity-nginx" rel="noreferrer" target="_blank">https://github.com/SpiderLabs/ModSecurity-nginx</a><br>
>  $ cd /opt/Modsecurity-nginx<br>
>  $ git checkout experimental<br>
>  $ cd /opt/<br>
>  *******************************************************************<br>
>  $ wget <a href="http://nginx.org/download/nginx-1.9.2.tar.gz" rel="noreferrer" target="_blank">http://nginx.org/download/nginx-1.9.2.tar.gz</a><br>
>  $ tar -xvzf nginx-1.9.2.tar.gz<br>
>  $ yum install zlib-devel<br>
>  *******************************************************************<br>
>  $ ./configure --add-module=/opt/ModSecurity-nginx<br>
><br>
><br>
><br>
>  Everything went fine until the last ./configure ....<br>
>  I  didn't  apply  what's  between  " *** " because my nginx server is<br>
>  already installed and working.<br>
><br>
>  Any ideas ?<br>
><br>
>  Thx<br>
>  --<br>
>  Cordialement,<br>
>   Thierry                          e-mail : <a href="mailto:lenaigst@maelenn.org">lenaigst@maelenn.org</a><br>
><br>
>  _______________________________________________<br>
>  nginx mailing list<br>
>  <a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
>  <a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
><br>
<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><b>Anoop P Alias</b> <div><br></div></div></div></div>
</div>