From e27b4e574de390fcaa8293ddbb7165bcfb070f7b Mon Sep 17 00:00:00 2001 From: zhengkunwang223 <1paneldev@sina.com> Date: Tue, 8 Apr 2025 11:38:41 +0800 Subject: [PATCH] feat: update openresty config --- .../1.21.4.3-3-3-focal/1pwaf/data/html-en/cc.html | 2 +- .../1pwaf/data/html-en/forbidden.html | 2 +- .../1.21.4.3-3-3-focal/1pwaf/data/html-en/geo.html | 2 +- .../1.21.4.3-3-3-focal/1pwaf/data/html-en/ip.html | 2 +- .../1pwaf/data/html-en/redirect.html | 2 +- .../1pwaf/data/html-en/unknown.html | 2 +- openresty/1.27.1.1-1-focal/conf/nginx.conf | 14 ++++++++++---- 7 files changed, 16 insertions(+), 10 deletions(-) diff --git a/openresty/1.21.4.3-3-3-focal/1pwaf/data/html-en/cc.html b/openresty/1.21.4.3-3-3-focal/1pwaf/data/html-en/cc.html index 6bd0296d2..f4c67d97c 100644 --- a/openresty/1.21.4.3-3-3-focal/1pwaf/data/html-en/cc.html +++ b/openresty/1.21.4.3-3-3-focal/1pwaf/data/html-en/cc.html @@ -65,7 +65,7 @@
diff --git a/openresty/1.21.4.3-3-3-focal/1pwaf/data/html-en/forbidden.html b/openresty/1.21.4.3-3-3-focal/1pwaf/data/html-en/forbidden.html index 25fbcf625..4b92fd05d 100644 --- a/openresty/1.21.4.3-3-3-focal/1pwaf/data/html-en/forbidden.html +++ b/openresty/1.21.4.3-3-3-focal/1pwaf/data/html-en/forbidden.html @@ -65,7 +65,7 @@ diff --git a/openresty/1.21.4.3-3-3-focal/1pwaf/data/html-en/geo.html b/openresty/1.21.4.3-3-3-focal/1pwaf/data/html-en/geo.html index c5462d050..1454b8789 100644 --- a/openresty/1.21.4.3-3-3-focal/1pwaf/data/html-en/geo.html +++ b/openresty/1.21.4.3-3-3-focal/1pwaf/data/html-en/geo.html @@ -65,7 +65,7 @@ diff --git a/openresty/1.21.4.3-3-3-focal/1pwaf/data/html-en/ip.html b/openresty/1.21.4.3-3-3-focal/1pwaf/data/html-en/ip.html index 9e8d24dcc..198f2cadc 100644 --- a/openresty/1.21.4.3-3-3-focal/1pwaf/data/html-en/ip.html +++ b/openresty/1.21.4.3-3-3-focal/1pwaf/data/html-en/ip.html @@ -65,7 +65,7 @@ diff --git a/openresty/1.21.4.3-3-3-focal/1pwaf/data/html-en/redirect.html b/openresty/1.21.4.3-3-3-focal/1pwaf/data/html-en/redirect.html index fc52d80e5..34045e43e 100644 --- a/openresty/1.21.4.3-3-3-focal/1pwaf/data/html-en/redirect.html +++ b/openresty/1.21.4.3-3-3-focal/1pwaf/data/html-en/redirect.html @@ -19,7 +19,7 @@ body { font-family: 'Arial', sans-serif; background-color: #282c34; color: #fff;Your request is invalid and has been denied.
diff --git a/openresty/1.21.4.3-3-3-focal/1pwaf/data/html-en/unknown.html b/openresty/1.21.4.3-3-3-focal/1pwaf/data/html-en/unknown.html index 65b1f7ee0..760eda86e 100644 --- a/openresty/1.21.4.3-3-3-focal/1pwaf/data/html-en/unknown.html +++ b/openresty/1.21.4.3-3-3-focal/1pwaf/data/html-en/unknown.html @@ -65,7 +65,7 @@ diff --git a/openresty/1.27.1.1-1-focal/conf/nginx.conf b/openresty/1.27.1.1-1-focal/conf/nginx.conf index 356e4f2ee..a97217d27 100644 --- a/openresty/1.27.1.1-1-focal/conf/nginx.conf +++ b/openresty/1.27.1.1-1-focal/conf/nginx.conf @@ -3,9 +3,12 @@ worker_processes auto; error_log /var/log/nginx/error.log notice; error_log /dev/stdout notice; pid /var/run/nginx.pid; +worker_rlimit_nofile 51200; events { - worker_connections 1024; + use epoll; + worker_connections 5120; + multi_accept on; } http { @@ -14,16 +17,19 @@ http { log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; - server_tokens off; access_log /var/log/nginx/access.log main; access_log /dev/stdout main; - sendfile on; + + server_tokens off; + sendfile on; + tcp_nopush on; + tcp_nodelay on; server_names_hash_bucket_size 512; client_header_buffer_size 32k; client_max_body_size 50m; keepalive_timeout 60; - keepalive_requests 100000; + keepalive_requests 100; gzip on; gzip_min_length 1k;