mirror of
				https://github.com/continew-org/continew-admin.git
				synced 2025-10-26 18:58:37 +08:00 
			
		
		
		
	chore: 优化 Nginx 配置文件
This commit is contained in:
		| @@ -40,14 +40,17 @@ http { | ||||
|         ssl_prefer_server_ciphers on; | ||||
|  | ||||
|         location / { | ||||
|             proxy_http_version 1.1; | ||||
|             proxy_set_header Upgrade $http_upgrade; | ||||
|             proxy_set_header Connection "upgrade"; | ||||
|             proxy_ignore_client_abort on; | ||||
|             proxy_set_header Host $http_host; | ||||
|             proxy_set_header X-Real-IP $remote_addr; | ||||
|             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||||
|             proxy_pass http://admin-server/; | ||||
|             proxy_ignore_client_abort on; | ||||
|             proxy_http_version 1.1; | ||||
|  | ||||
|             # Proxy headers | ||||
|             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; | ||||
|         } | ||||
|  | ||||
|         error_page   500 502 503 504  /50x.html; | ||||
| @@ -87,14 +90,17 @@ http { | ||||
|  | ||||
|         # /api/ 代理到后端(如果使用 /api/ 前缀代理而不使用 api 域名提供后端服务,可放开此配置) | ||||
|         #location /api/ { | ||||
|         #    proxy_http_version 1.1; | ||||
|         #    proxy_set_header Upgrade $http_upgrade; | ||||
|         #    proxy_set_header Connection "upgrade"; | ||||
|         #    proxy_ignore_client_abort on; | ||||
|         #    proxy_set_header Host $http_host; | ||||
|         #    proxy_set_header X-Real-IP $remote_addr; | ||||
|         #    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||||
|         #    proxy_pass http://admin-server/; | ||||
|         #    proxy_ignore_client_abort on; | ||||
|         #    proxy_http_version 1.1; | ||||
|         # | ||||
|         #    # Proxy headers | ||||
|         #    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; | ||||
|         #} | ||||
|  | ||||
|         error_page   500 502 503 504  /50x.html; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user