Help » Features & reports » Visitors » Blocking visitors »

Nginx web server

Unfortunately nginx does not have an easy method like Apache where you can just create a dynamic file in your site's directory (.htaccess) that nginx will parse in real time. Their reasoning for that is here. We strongly disagree with their logic, which is really only applicable to very high traffic web sites, we're talking the top 0.1% of all web sites in the world... but them's the berries.

To block an IP in nginx, you have to be able to edit your nginx server configuration file. If you're capable of doing that yourself, you just need to create a simple "location" rule. You can see the structure of that in the nginx docs.