Skip to content

Instantly share code, notes, and snippets.

@arosenhagen
arosenhagen / gist:8aaf5d7f94171778c0e9
Last active February 16, 2021 11:34 — forked from supairish/gist:2951524
[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 {