|
|
@@ -5,14 +5,15 @@ server {
|
|
|
|
|
|
# 前端静态文件
|
|
|
location / {
|
|
|
- root /usr/share/nginx/html; # Vue/React 打包后的 dist 目录
|
|
|
+ autoindex on;
|
|
|
+ alias /usr/share/nginx/html; # Vue/React 打包后的 dist 目录
|
|
|
index index.html;
|
|
|
try_files $uri $uri/ /index.html; # 支持 Vue/React 前端路由
|
|
|
}
|
|
|
|
|
|
# 后端 API 代理
|
|
|
- location /api/ {
|
|
|
- proxy_pass http://ruoyi.autumn.com/api/; # 转发到后端服务
|
|
|
+ location /api/v1/ {
|
|
|
+ proxy_pass http://ruoyi.autumn.com/api/v1/; # 转发到后端服务
|
|
|
}
|
|
|
|
|
|
# 错误页面
|