diff --git a/nginx.conf b/nginx.conf index cbb1730..65202de 100644 --- a/nginx.conf +++ b/nginx.conf @@ -61,7 +61,7 @@ http { # 后端服务 - location /api/ { + location ^~ /api/ { proxy_pass http://huaxin-admin-server:8001/api/; # 转发规则 proxy_set_header Host $proxy_host; # 修改转发请求头,让目标应用可以受到真实的请求 proxy_set_header X-Real-IP $remote_addr; @@ -81,7 +81,7 @@ http { proxy_http_version 1.1; } # 文件访问 - location /upload/ { + location ^~ /upload/ { proxy_pass http://huaxin-admin-server:8001/upload/; proxy_set_header Host $proxy_host; # 修改转发请求头,让目标应用可以受到真实的请求 proxy_set_header X-Real-IP $remote_addr;