修改WVP 前端打包
This commit is contained in:
parent
d00aec5944
commit
fe7c7e0146
|
|
@ -14,20 +14,7 @@ http {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name localhost;
|
server_name localhost;
|
||||||
|
|
||||||
location / {
|
# WVP 后端 API 代理(优先匹配)
|
||||||
root /home/ruoyi/projects/wvp-ui;
|
|
||||||
try_files $uri $uri/ /index.html;
|
|
||||||
index index.html index.htm;
|
|
||||||
}
|
|
||||||
|
|
||||||
# 前端静态资源(CSS、JS、图片等)
|
|
||||||
location /static/ {
|
|
||||||
root /home/ruoyi/projects/wvp-ui;
|
|
||||||
expires 30d;
|
|
||||||
access_log off;
|
|
||||||
}
|
|
||||||
|
|
||||||
# WVP 后端 API 代理
|
|
||||||
location /api/ {
|
location /api/ {
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host $http_host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
|
@ -55,6 +42,20 @@ http {
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# 前端静态资源(CSS、JS、图片等)
|
||||||
|
location /static/ {
|
||||||
|
root /home/ruoyi/projects/wvp-ui;
|
||||||
|
expires 30d;
|
||||||
|
access_log off;
|
||||||
|
}
|
||||||
|
|
||||||
|
# 前端页面(最后匹配)
|
||||||
|
location / {
|
||||||
|
root /home/ruoyi/projects/wvp-ui;
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
index index.html index.htm;
|
||||||
|
}
|
||||||
|
|
||||||
# 避免actuator暴露
|
# 避免actuator暴露
|
||||||
if ($uri ~ "/actuator") {
|
if ($uri ~ "/actuator") {
|
||||||
return 403;
|
return 403;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue