Skip to content

Instantly share code, notes, and snippets.

View Mahaswami's full-sized avatar

Mahaswami Software Mahaswami

View GitHub Profile
@Mahaswami
Mahaswami / gist:3c79acfa2225f9a73f47e40ae57e704e
Created March 22, 2018 14:18 — forked from arosenhagen/gist:8aaf5d7f94171778c0e9
[nginx] limit requests from searchengine crawlers/bots to 1r/m (prevent DDOS)
http {
map $http_user_agent $limit_bots {
default '';
~*(bing|yandex|msnbot) $binary_remote_addr;
}
limit_req_zone $limit_bots zone=bots:10m rate=1r/m;
server {