From ea8225fee41aeee7ee928c2f319c0262d9a21e53 Mon Sep 17 00:00:00 2001 From: akun <957746831@qq.com> Date: Tue, 9 Apr 2024 10:49:14 +0800 Subject: [PATCH] =?UTF-8?q?nginx=E9=85=8D=E7=BD=AE=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf-ui/nginx.conf | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sf-ui/nginx.conf b/sf-ui/nginx.conf index 3846ef2..7fa2ea0 100644 --- a/sf-ui/nginx.conf +++ b/sf-ui/nginx.conf @@ -18,19 +18,22 @@ http { server_name localhost; charset utf-8; - #access_log logs/host.access.log main; - location / { root html; + try_files $uri $uri/ @router; index index.html index.htm; } + location @router { + rewrite ^.*$ /index.html last; + } + location /stage-api/ { proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header REMOTE-HOST $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_pass http://localhost:22009/; + proxy_pass http://192.168.1.23:22009/; } error_page 500 502 503 504 /50x.html;