I am attempting to setup nginx-ultimate-bad-bot-blocker on my nginx container which is based on the nginx:1.17.9 image.
As was discussed by the poster of #255 the setup script is not working because there is no vhosts directory for the official nginx image.
It seems that the official nginx image is supposed to be used as if it were a single vhost, so you would spin up multiple containers to handle multiple vhosts, although I can't seem to find documentation on this. Due to this, I am having trouble with the setup script.
Error Messages
root:/usr/local/sbin# ./setup-ngxblocker -z
find: '/etc/nginx/sites-available': No such file or directory
using a file extension for vhost files allows multiple domains to be included with a single directive in nginx.conf:
include /etc/nginx/sites-enabled/*.vhost;
see command line switches below: -e to customise the vhost file extension
no vhost files in: [ /etc/nginx/sites-available/*.vhost ] => exiting.
setup-ngxblocker: SETUP Nginx Bad Bot Blocker configuration in [ /etc/nginx/nginx.conf ] [ /etc/nginx/sites-available/* ]
Usage: setup-ngxblocker [OPTIONS]
[ -w ] : WWW path (default: /var/www)
[ -e ] : Vhost file extension (default: .vhost)
[ -v ] : Vhost directory (default: /etc/nginx/sites-available)
[ -b ] : Bot rules directory (default: /etc/nginx/bots.d)
[ -c ] : NGINX conf directory (default: /etc/nginx/conf.d)
[ -m ] : NGINX main configuration (default: /etc/nginx/nginx.conf)
[ -i ] : Change installer path (default: /usr/local/sbin/install-ngxblocker)
[ -l ] : Manual whitelist of domain (default: none)
[ -n ] : NO whitelist of .names only (default: Y)
[ -d ] : NO insert of DDOS rule (default: Y)
[ -z ] : NO configuration of vhosts (default: configure files in /etc/nginx/sites-available)
[ -x ] : Actually change the files (default: don't change anything)
[ -h ] : this help message
Examples:
setup-ngxblocker -n (Whitelist all directory names in /var/www as domains: not just dot.name directories)
setup-ngxblocker -l domain1.com -l domain2.com (Whitelist these manual domain name args)
setup-ngxblocker -d (Do not insert DDOS rule: these may clash with existing 'limit_conn addr' rules)
setup-ngxblocker (Don't change anything: display results on stdout)
setup-ngxblocker -x (Change / update config files)
Copy of nginx.conf
If applicable please paste your nginx.conf file here
(paste in between the markers)
Paste nginx.conf here
Copy of vhost / website / host .conf file
N/A
Server (please complete the following information):
Relevant issues:
194
255
Describe the problem you are experiencing
I am attempting to setup nginx-ultimate-bad-bot-blocker on my nginx container which is based on the nginx:1.17.9 image. As was discussed by the poster of #255 the setup script is not working because there is no vhosts directory for the official nginx image.
It seems that the official nginx image is supposed to be used as if it were a single vhost, so you would spin up multiple containers to handle multiple vhosts, although I can't seem to find documentation on this. Due to this, I am having trouble with the setup script.
Error Messages
Copy of nginx.conf
If applicable please paste your nginx.conf file here (paste in between the
markers)
Copy of vhost / website / host .conf file
N/A
Server (please complete the following information):