Closed killmasta93 closed 2 years ago
You've added the blocker includes in your /.well-known location block and not your / location block
Thank you that did the trick,
quick question it works when i try https but when i try http i get this, im guessing its normal?
HTTP/1.1 301 Moved Permanently
Server: nginx/1.21.6
Date: Thu, 10 Feb 2022 22:48:55 GMT
Content-Type: text/html
Content-Length: 169
Connection: keep-alive
Location: https://mydomain.com/
http
code 301
is a permanent redirect.
redirecting http
to https
is considered a best practice for the web nowadays (so yes is normal & recommended on web servers to encrypt data to / from the client browser))
Best is to configure your port 80 config to drop bots before they even get redirected to 443, I do this on all my sites.
server {
listen 80;
listen [::]:80;
...
...
...
...
location / {
# Block Bad Bots
include /etc/nginx/bots.d/blockbots.conf;
include /etc/nginx/bots.d/ddos.conf;
return 301 https://yourdomain$request_uri;
}
# END OF HTTP PORT 80 HOST CONFIG - CLOSING BRACE BELOW THIS LINE
}
Describe the problem you are experiencing
Currently not blocking while doing the tests
Error Messages
i should get
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
If applicable please paste your site/vhost configuration file in between the code ticks (paste in between the
markers)
Screenshots
If applicable, add screenshots to help explain your problem.
Server (please complete the following information):
Operating System:
[ ] Ubuntu
Additional information
this is my default.conf