Coder Social home page Coder Social logo

Comments (5)

makorne avatar makorne commented on June 13, 2024 3

I moved

# Bad Bot Blocker
include /etc/nginx/bots.d/blockbots.conf;
include /etc/nginx/bots.d/ddos.conf;

inside server block { ... }
and the error was gone!
Thank you!

from nginx-ultimate-bad-bot-blocker.

mitchellkrogza avatar mitchellkrogza commented on June 13, 2024

@makorne that's a very old version of Nginx. This has only been developed and tested on Nginx 1.10.0 > 1.10.3 there is probably missing modules and other changes your are missing in your version of Nginx.

from nginx-ultimate-bad-bot-blocker.

makorne avatar makorne commented on June 13, 2024

nginx: [emerg] "if" directive is not allowed here in /etc/nginx/bots.d/blockbots.conf:22
nginx: configuration file /etc/nginx/nginx.conf test failed
nginx -v
nginx version: nginx/1.12.1

from nginx-ultimate-bad-bot-blocker.

mitchellkrogza avatar mitchellkrogza commented on June 13, 2024

Please paste your vhost config(s) here and also your nginx.conf. I have people using it from 1.10 > 1.13 of Nginx

from nginx-ultimate-bad-bot-blocker.

mitchellkrogza avatar mitchellkrogza commented on June 13, 2024

Perfect glad you got it sorted. You should use the install, setup and update scripts as they work like a charm and @itoffshore Stuart Cardall did some really excellent work on those. Happy bot and spam blocking and let me know how it goes. Remember to monitor your logs as per my examples on the main README.md file.

from nginx-ultimate-bad-bot-blocker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.