Open Danrancan opened 2 years ago
Hi @Danrancan you can either comment out the duplicate settings in /etc/nginx/conf.d/botblocker-nginx-settings.conf or in your nginx.conf it's up to you.
Hi @Danrancan you can either comment out the duplicate settings in /etc/nginx/conf.d/botblocker-nginx-settings.conf or in your nginx.conf it's up to you.
Thanks for the reply. I am aware that I can just comment this out. But that doesn't really answer the question or solve the issue, because as soon as I comment it out, I then get another nginx -t error about another duplicate line that is non-exhistent, and after I comment that out, another duplicate error and so forth in a cycle of duplicate errors when the duplicates don't seem to exist in the first place. What I am trying to say, is that the grep search I did is somehow showing that my nginx modules are creating duplicate directives that clash with botblocker. There is no other trace of these duplicate lines anywhere in my conf files. So my question is, HOW CAN I FIND THE REAL DUPLICATE or, TRACE WHAT IS CAUSING NGINX TO THINK I HAVE A DUPLICATE, WHEN I REALLY DO NOT?
If you commented out all those variables in botblocker-nginx-settings.conf as below and it still gives you an error
# Version 1.1
# ! new directives also to be added to include_filelist.txt ! #
#server_names_hash_bucket_size 256;
#server_names_hash_max_size 4096;
#variables_hash_max_size 4096;
#variables_hash_bucket_size 4096;
limit_req_zone $binary_remote_addr zone=flood:50m rate=90r/s;
limit_conn_zone $binary_remote_addr zone=addr:50m;
then it cannot be the blocker but rather these files where your grep hit matches
Binary file /etc/nginx/modules/ngx_http_brotli_static_module.so matches
Binary file /etc/nginx/modules/ngx_http_modsecurity_module.so matches
Binary file /etc/nginx/modules/ngx_pagespeed.so matches
then it cannot be the blocker but rather these files where your grep hit matches
@mitchellkrogza I suspected that these files were somehow causing the issue since grep hits them. However, I have no idea what that means. Does it somehow mean that Binary file /etc/nginx/modules/ngx_http_brotli_static_module.so is somehow magically inserting invisible and duplicate entries in my conf files? Do these .so modules somehow have code or a file inside of them that enters duplicate entries in my conf files when using the modules? I'm literally so confused here. I just don't understand where these duplicates are coming from when there is no visible or apparent duplicate in any of my conf files. P.S. Sorry for the late reply.
@Danrancan Just a thought but I can see these lines in your config:
include /etc/nginx/conf.d/botblocker-nginx-settings.conf;
include /etc/nginx/conf.d/globalblacklist.conf;
[lines removed]
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
so it might be inadvertendly including everything twice. You could probably remove the first 2 lines as the 2nd set should also include the first. It's probably worth checking this.
Did you look through existing ISSUES ?
Yes.
Describe the problem you are experiencing
It seems that somehow my pagespeed, modsecurity, and brotli nginx modules are causing duplicate directives in the bad-bot-blocker configuration files, as my nginx test is showing non-existent duplicate directives. What can I do to figure this out? Please help?
Error Messages
When running the nginx test after installation,
sudo nginx -t
returns the following error:Following that, I run a grep search for the duplicate directive...
I have also checked all of my .conf and .vhost files manually for duplicate directives, none of which can be found.
Copy of nginx.conf
Copy of vhost / website / host .conf file
Server (please complete the following information):
Operating System:
[X ] Ubuntu
[ ] Alpine
[ ] Arch Linux
[ ] Debian
[ ] CentOS
[ ] Fedora
[ ] Deepin
[ ] Windows
[ ] Other