From 4fbb39837d658d3b921707a560d76fad2b3cd7f1 Mon Sep 17 00:00:00 2001 From: wwya Date: Mon, 30 Mar 2026 20:26:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20config/nginx.conf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/nginx.conf | 63 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/config/nginx.conf b/config/nginx.conf index e69de29..f058510 100644 --- a/config/nginx.conf +++ b/config/nginx.conf @@ -0,0 +1,63 @@ +user nginx; +worker_processes auto; +worker_cpu_affinity auto; + +#error_log logs/error.log; +#error_log logs/error.log notice; +#error_log logs/error.log info; + +#pid logs/nginx.pid; + + +events { + worker_connections 65535; + multi_accept on; + use epoll; +} + + +http { + include mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log off; + + sendfile on; + tcp_nopush on; + tcp_nodelay on; + + keepalive_timeout 300; + keepalive_requests 10000; + client_body_timeout 120s; + client_header_timeout 120s; + send_timeout 120s; + + + ssi on; + ssi_silent_errors on; + ssi_types text/shtml; + server_names_hash_bucket_size 1280; + client_max_body_size 32M; + client_header_buffer_size 32m; + large_client_header_buffers 4 32m; + + server_tokens off; + ignore_invalid_headers on; + recursive_error_pages on; + server_name_in_redirect off; + + gzip on; + gzip_min_length 2k; + gzip_buffers 4 16k; + gzip_http_version 1.1; + gzip_comp_level 5; + gzip_types text/javascript text/plain application/x-javascript text/css application/xml application/json application/javascript image/jpeg image/jpg image/gif image/png; + gzip_vary on; + gzip_proxied any; + + include conf.d/*.conf; +}