From 8ac29ff562f85f6affe3fcbfa83db78c7e7be5d9 Mon Sep 17 00:00:00 2001 From: 728 Date: Sat, 3 Dec 2022 14:36:14 +0800 Subject: [PATCH] nginx #23 --- nginx.conf | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/nginx.conf b/nginx.conf index c854dbb..715b61c 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,4 +1,4 @@ -worker_processes 1; +worker_processes auto; events { worker_connections 2048; @@ -41,7 +41,7 @@ http { 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_req zone=h1_req burst=10 nodelay; limit_conn addr_conn 100; limit_req zone=addr_req burst=20 nodelay; @@ -61,8 +61,29 @@ http { server { listen 80; + listen [::]:80; + + server_name ismist.cn; + + location / { + return 301 https://$host$request_uri; + } + } + + server { + listen 443 ssl http2; + listen [::]:443 ssl http2; server_name ismist.cn localhost; + ssl_protocols TLSv1.2 TLSv1.3; + ssl_certificate ssl/ismist.cn.crt; + ssl_certificate_key ssl/ismist.cn.key; + ssl_session_cache shared:SSL:50m; + ssl_session_timeout 1d; + ssl_session_tickets off; + ssl_stapling on; + ssl_stapling_verify on; + root ui; location = / { @@ -77,17 +98,5 @@ http { location / { return 444; } - - location /cast { - auth_request /aut; - auth_request_set $auth_status $upstream_status; - } - - location /aut { - internal; - proxy_pass http://127.0.0.1:728/aut$request_uri; - proxy_pass_request_body off; - proxy_set_header Content-Length ""; - } } }