From efe0972ca3e0f816bc274c4e579d61763ac2adcf Mon Sep 17 00:00:00 2001
From: chen.lin <1442464845@qq.com>
Date: 星期一, 09 二月 2026 16:34:58 +0800
Subject: [PATCH] 翻译修复

---
 rsf-admin/nginx.conf |  128 +++++++++++++++---------------------------
 1 files changed, 47 insertions(+), 81 deletions(-)

diff --git a/rsf-admin/nginx.conf b/rsf-admin/nginx.conf
index e928cce..db41c4e 100644
--- a/rsf-admin/nginx.conf
+++ b/rsf-admin/nginx.conf
@@ -1,103 +1,69 @@
-user  nginx;
+# Windows Nginx 涓婚厤缃枃浠�
+
 worker_processes  auto;
 
-error_log  /var/log/nginx/error.log notice;
-pid        /var/run/nginx.pid;
+error_log  logs/error.log notice;
+pid        logs/nginx.pid;
 
 events {
     worker_connections  2048;
 }
 
 http {
-    include       /etc/nginx/mime.types;
+    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  /var/log/nginx/access.log  main;
-    error_log  /var/log/nginx/error.log error;
+    log_format api_log '$remote_addr - $remote_user [$time_local] '
+                       '"$request_method $request_uri HTTP/$server_protocol" '
+                       '$status $body_bytes_sent "$http_referer" '
+                       '"$http_user_agent" "$http_x_forwarded_for" '
+                       'request_time="$request_time" '
+                       'upstream_response_time="$upstream_response_time" '
+                       'request_length="$request_length"';
 
+    log_format json_log '$remote_addr - $remote_user [$time_local] '
+                        '"$request_method $request_uri HTTP/$server_protocol" '
+                        '$status $body_bytes_sent '
+                        '"$http_referer" "$http_user_agent" '
+                        '"$http_x_forwarded_for" '
+                        'request_body="$request_body" '
+                        'content_type="$content_type" '
+                        'request_time="$request_time" '
+                        'upstream_response_time="$upstream_response_time"';
+
+    # 鍏ㄥ眬鏃ュ織锛坰erver 涓彲瑕嗙洊锛�
+    access_log  logs/access.log  main;
+    error_log   logs/error.log error;
+
+    # 鍏ㄥ眬閰嶇疆
     client_max_body_size 300M;
-
-    upstream api_backend {
-        server 10.10.10.199:8088;
-        # ......
-    }
-
-    server {
-        listen       80;
-	    listen	     8080;
-        server_name  localhost;
-
-        location / {
-            root   /app/www;
-	        try_files $uri $uri/ /index.html;
-            index  index.html index.htm;
-        }
-
-        # Http
-        location /api/ {
-            # rewrite ^/api/(.*)$ /$1 break;  # if you wanna remove proxy prefix
-            proxy_pass http://api_backend/api/;
-            proxy_set_header Host $host;
-            proxy_set_header X-Real-IP $remote_addr;
-            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-            proxy_set_header X-Forwarded-Proto $scheme;
-
-            # buffer
-            proxy_buffers 8 16k;
-            proxy_buffer_size 32k;
-            
-            # timeout
-            # proxy_connect_timeout 60s;
-            # proxy_read_timeout 60s;
-            # proxy_send_timeout 60s;
-        }
-
-        # WebSocket
-        location /ws/ {
-            # ws
-            proxy_pass http://api_backend/ws/;
-            # wss
-            # proxy_pass wss://api_backend/ws/;
-            
-            proxy_http_version 1.1;
-            proxy_set_header Upgrade $http_upgrade;
-            proxy_set_header Connection "upgrade";
-            proxy_set_header Host $host;
-            proxy_set_header X-Real-IP $remote_addr;
-            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-            proxy_set_header X-Forwarded-Proto $scheme;
-            proxy_buffering off;
-
-            # timeout
-            # proxy_connect_timeout 60s;
-            # proxy_read_timeout 60s;
-            # proxy_send_timeout 60s;
-        }
-        
-        # HTTPS
-        # listen 443 ssl;
-        # ssl_certificate /path/to/cert.pem;
-        # ssl_certificate_key /path/to/key.pem;
-
-        error_page   500 502 503 504  /50x.html;
-
-        location = /50x.html {
-            root   html;
-        }
-        
-    }
-
     sendfile        on;
-    #tcp_nopush     on;
-
+    tcp_nopush      on;
+    tcp_nodelay     on;
     keepalive_timeout  65;
 
-    #gzip  on;
+    # Gzip 鍘嬬缉
+    gzip  on;
+    gzip_vary on;
+    gzip_min_length 1000;
+    gzip_proxied any;
+    gzip_comp_level 6;
+    gzip_types text/plain text/css text/xml text/javascript application/json application/javascript application/xml+rss application/rss+xml font/truetype font/opentype application/vnd.ms-fontobject image/svg+xml;
 
-    include /etc/nginx/conf.d/*.conf;
+    # 鍚庣鏈嶅姟鍣ㄩ厤缃�
+    upstream api_backend {
+        server 127.0.0.1:8081;
+    }
     
+    upstream server_backend {
+        server 127.0.0.1:8085;
+    }
+
+    # 寮曞叆 server 閰嶇疆
+    include conf.d/*.conf;
 }

--
Gitblit v1.9.1