我希望访问的项目地址为: http://website/abc/def/
所以对项目进行如下修改:
base: '/abc/def/'
server {
listen 8060 default_server;
listen [::]:8060 default_server;
server_name localhost;
root /home/deploy/release/antd-admin/1.0.0;
location / {
index index.html;
try_files $uri $uri /index.html;
}
}
server {
listen 4000;
server_name _;
location / {
proxy_pass http://localhost:8060/;
}
}
虽然这样配置的项目访问是正确的。但是这样配置,会占据 http://website/ 这个根地址
我希望再nginx中更新访问地址如下
即
server {
listen 4000;
server_name _;
location /abc/def/ {
xxx;
xxx;}
}
这个时候应该修改哪里?尝试了几种办法,均没有实现~~,求助!!
这个问题的核心其实是数据资源映射的问题。增加如下即可
publicPath: 'https://xaudio-dulife.baidu.com/mgmt/reed/'
Most helpful comment
这个问题的核心其实是数据资源映射的问题。增加如下即可
.umirc.js
publicPath: 'https://xaudio-dulife.baidu.com/mgmt/reed/'