the script will try to insert the new configuration below any
existing includes in your config files. If the search string is
not found the inserts are made at the end of the start search
range:
* for vhost files this is below the server_* directives.
* for nginx.conf this is below http{
The search ranges & search string can be changed in main().
usage instructions can be found by running:
setup-ngxblocker -h or --help
by default running the script with no command line switches does a
"dry run" & prints to stdout the files & includes it would change:
setup-ngxblocker
to actually make changes you need to run with -x:
setup-ngxblocker -x
Notification System for this repo introduced today.
You can subscribe to notifications at:
**https://groups.google.com/forum/#!forum/nginx-ultimate-bad-bot-blocker**
or send a blank email to
**nginx-ultimate-bad-bot-blocker+subscribe@googlegroups.com**
Please make sure you are subscribed to notifications to be notified when the blocker is updated and also to be notified when any important or mission critical changes take place.
* sending email via the script is optional
(users may already have MAILTO set in cron or monitor syslogs by email)
* only reload nginx config if the download is successful
Add man pages for Alpine Linux / improve update script for Alpine / Arch Linux / Debian / Centos script compatibility by Stuart Cardall. Thank you @itoffshore for your contribution.
adds compatibility for reloading Nginx on:
* Arch Linux (does not have a 'service' command)
* OpenRC (older versions do not have /sbin/service)
tested on Debian / Arch / Centos / Alpine Linux