reverse: add anti-flood protection

This commit is contained in:
Wonderfall 2017-09-21 15:01:21 +02:00 committed by GitHub
parent 1effc7b627
commit 74b705ec58

View File

@ -1,7 +1,7 @@
#user web;
worker_processes auto;
pid /nginx/run/nginx.pid;
daemon off;
pcre_jit on;
events {
worker_connections 2048;
@ -9,6 +9,11 @@ events {
}
http {
limit_conn_zone $binary_remote_addr zone=limit_per_ip:10m;
limit_conn limit_per_ip 128;
limit_req_zone $binary_remote_addr zone=allips:10m rate=150r/s;
limit_req zone=allips burst=150 nodelay;
include /nginx/conf/mime.types;
default_type application/octet-stream;