From 38f971bf6ef8cfbdfae085f9337ba02ac9fb381e Mon Sep 17 00:00:00 2001 From: 728 Date: Sat, 3 Dec 2022 13:41:09 +0800 Subject: [PATCH] nginx #23 --- nginx.conf | 11 +++++------ nginx.ssl.conf | 5 ++--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/nginx.conf b/nginx.conf index d20b3ea..c854dbb 100644 --- a/nginx.conf +++ b/nginx.conf @@ -40,6 +40,11 @@ http { limit_req_zone $binary_remote_addr zone=addr_req:10m rate=100r/s; limit_req_zone $h1_addr zone=h1_req:10m rate=10r/m; + limit_conn h1_conn 10; + limit_req zone=h1_req burst=5 nodelay; + limit_conn addr_conn 100; + limit_req zone=addr_req burst=20 nodelay; + types { text/html html; text/css css; @@ -58,12 +63,6 @@ http { listen 80; server_name ismist.cn localhost; - limit_conn h1_conn 10; - limit_req zone=h1_req burst=5 nodelay; - - limit_conn addr_conn 100; - limit_req zone=addr_req burst=20 nodelay; - root ui; location = / { diff --git a/nginx.ssl.conf b/nginx.ssl.conf index 72c66fb..2c89ac8 100644 --- a/nginx.ssl.conf +++ b/nginx.ssl.conf @@ -42,6 +42,8 @@ http { limit_conn h1_conn 10; limit_req zone=h1_req burst=5 nodelay; + limit_conn addr_conn 100; + limit_req zone=addr_req burst=20 nodelay; types { text/html html; @@ -82,9 +84,6 @@ http { ssl_stapling on; ssl_stapling_verify on; - limit_conn addr_conn 100; - limit_req zone=addr_req burst=20 nodelay; - root ui; location = / {