Nginx+NAXSI Install Script
#1
So I've found that installing Nginx and NAXSI by compiling from source, setting up users - services - etc, and then installing it, and then configuring it takes quite some time. Because of that I've written a script that does everything for you, by default NAXSI will run in learning mode until you take time to configure rules specific to your app. You can check it out at https://github.com/nsuchy/nginx-naxsi-installer/ please let me know your thoughts on this script Smile
Reply
#2
Good stuff Lunorian. Thanks a lot for sharing this, i am sure it will come in handy for anyone looking to automate setting up Nginx.
Reply
#3
(05-20-2017, 06:04 PM)Vector Wrote: Good stuff Lunorian. Thanks a lot for sharing this, i am sure it will come in handy for anyone looking to automate setting up Nginx.

Yea plus it's the latest stable version of nginx, Ubuntu maintains nginx 1.10 (legacy, they backport security patches!), however this will be faster and more secure. After it runs you are free to pull the configure option from line 39 and rerun it with the options of your choice, after make any source code edits you need, then just run make, make install, and then service nginx restart and it's finished. I've included NAXSI by default, I'm considering including Lua in it since Lua is so popular for nginx modules. That might come in a future update, for now you'll need to make the change manually Smile

Hint: Edit /src/http/ngx_http_header_filter_module.c and /src/http/ngx_http_special_response.c to change the server header and error pages from saying nginx to lunorian-nginx or whatever you wanna rename nginx too Smile

Edit: I decided to add in Lua support so you guys can easily add in module-like features to nginx without the need for a ton of work https://github.com/nsuchy/nginx-naxsi-in...c5cde56d92.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  53R3N17Y - Python Based Script For Information Gathering. abaykan 6 5,960 04-18-2018, 09:23 PM
Last Post: Vector