ajdruff / nginx-naxsi-rpm

rpm build files used to create a custom Nginx rpm that includes the Naxsi WAF.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GitHub Project: nginx-naxsi-rpm

this is a test change

rpm build files used to create a custom Nginx rpm that includes the Naxsi WAF.

#About

This project provides the rpmbuild files necessary to build a custom rpm for Nginx on CentOS, adding the naxsi Web Application Firewall.

Do you just want to install a nginx-naxsi rpm for CentOS? If all you want to do is download an already compiled rpm for CentOS, you can do so using simpliwp/rpm-repos. Save yourself some headaches and don't compile and run this project since I've already built the rpm for you. This project is only for those who want to be able to customize the rpm or use it as a template to create other customized rpms

References:

######How to Use this Project

Overview:

These files are intended to be built on a CentOS 6.5 build server with all the development tools installed. It is highly recommended that you do not attempt this on a production server and that you create a non-sudo user specifically for building the rpm.

Prep Your Build Server

sudo yum  install --enablerepo=epel yum-utils rpmdevtools

(OR, since Development Tools includes rpmdevtools)

sudo yum groupinstall --enablerepo=epel  'Development Tools'
sudo yum  install --enablerepo=epel yum-utils

Create Build User

sudo useradd builder
sudo passwd builder 
su - builder

Create rpmbuild directory

If you don't already have a rpmbuild directory in your builder user's root, create one now, or backup your old one:

to create a new rpmbuild directory, login as the 'builder' user created above and run the following:

rpmdev-setuptree

This will create a rpmbuild directory in the user's home directory, and a .rpmmacros file.

Download this project

Download and untar this project

wget https://github.com/simpliwp/nginx-naxsi-rpmbuild-centos6/archive/master.tar.gz
tar -xzvf master.tar.gz

now overwrite your rpmbuild directory with its contents

mv nginx-naxsi-rpmbuild-centos6-master/* ~/rpmbuild/

Customize the spec

(optional)

nano ~/rpmbuild/SPECS/nginx-naxsi.spec

Build the rpm

rpmbuild -ba ~/rpmbuild/SPECS/nginx-naxsi.spec

Your rpm will be located in ~/rpmbuild/RPMS/x86_64

(OR if your rpmbuild directory is somewhere other than your user's home directory, try this :

rpmbuild --define "_topdir $HOME/path/to/top/level/directory" -ba /path/to/top/level/directory/SPECS/nginx-naxsi.spec )

Install the rpm

sudo yum install ~/rpmbuild/RPMS/x86_64/nginx-naxsi-1.6.0-1.el6.ngx.x86_64.rpm

be sure to match the path and name of the rpm with the file that was produced.

For additional information on how to configure, see the readme for my nginx-naxsi project

Contributors:

Andrew Druffner andrew at nomstock.com

About

rpm build files used to create a custom Nginx rpm that includes the Naxsi WAF.


Languages

Language:C 84.2%Language:Ruby 7.9%Language:Perl 5.4%Language:Vim Script 0.7%Language:Python 0.7%Language:C++ 0.5%Language:Shell 0.5%Language:Objective-C 0.1%Language:Assembly 0.0%