Welcome! Log In Create A New Profile

Advanced

Re: nginx modsecurity on Debian 8

Alt
December 23, 2015 11:47AM
Hello Thierry,

Here's a quick howto build a nginx debian package, I hope it's clear and that I'm not making mistakes.

First, you need to get the source of nginx and others files to build the package. You can probably do something like "apt-get source nginx", but I prefer to go on this page: https://packages.debian.org/jessie/nginx and manually download the 3 files on the right.
Something like "wget http://http.debian.net/debian/pool/main/n/nginx/nginx_1.6.2-5.dsc http://http.debian.net/debian/pool/main/n/nginx/nginx_1.6.2.orig.tar.gz http://http.debian.net/debian/pool/main/n/nginx/nginx_1.6.2-5.debian.tar.xz".

Then, you uncompress everything with: "dpkg-source -x nginx_1.6.2-5.dsc"

Then "cd nginx_1.6.2-5"

Here, you will have to do something to add ModSecurity. Normally, you add a 3rd party module by adding something like "--add-module=full/path/to/the/module-source" in the "debian/rules" file (where there are others parameters like "--with-ipv6" or "--with-http_ssl_module").
Check the "debian/rules" and add your parameter only to the flavor you will use (full, light,...). Or add the parameter for each of them if you are not sure.
I don't know if ModSecurity need something special.

Last step, execute: "dpkg-buildpackage -B -uc" to compile everything and build the ".deb" packages. Note that you will get several of them: full, extras, light, with or without debug,... (regarding this flavors, see previous step: where you added the parameter).

Then install your newly created package with: "dpkg -i nginx-THE-FLAVOR-YOU-WANT.deb"


PS: I'm really sorry if there are some mistakes (maybe in the filenames?), I just wrote the instructions from memory.

PS2: I suggest you first do all this steps, without the one regarding ModSecurity (so without editing "debian/rules"), just to be sure everything goes well.

Best Regards.
Subject Author Posted

nginx modsecurity on Debian 8

Thierry December 23, 2015 07:24AM

Re: nginx modsecurity on Debian 8

Anoop Alias December 23, 2015 07:36AM

Re: nginx modsecurity on Debian 8

Thierry December 23, 2015 07:46AM

Re: nginx modsecurity on Debian 8

Anoop Alias December 23, 2015 07:54AM

Re: nginx modsecurity on Debian 8

Nikolai Lusan December 23, 2015 08:04AM

Re: nginx modsecurity on Debian 8

Thierry December 23, 2015 10:10AM

Re: nginx modsecurity on Debian 8

Alt December 23, 2015 11:47AM

Re: nginx modsecurity on Debian 8

Thierry December 23, 2015 12:32PM

Re: nginx modsecurity on Debian 8

nanaya December 23, 2015 12:34PM

Re: nginx modsecurity on Debian 8

Thierry December 23, 2015 01:40PM

Re: nginx modsecurity on Debian 8

Alt December 23, 2015 04:30PM

Re: nginx modsecurity on Debian 8

Alt December 23, 2015 04:27PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 95
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready