#后台服务配置,配置了这个location便可以通过http://域名/jeecg-boot/xxxx 访问
location ^~ /huochudiya {
proxy_pass http://127.0.0.1:8082/huochudiya; //这个是后台地址
proxy_set_header Host 127.0.0.1;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
#解决Router(mode: 'history')模式下,刷新路由地址不能找到页面的问题
location /niuhoutai { 访问:http://ip+niuhoutai即可进入html/niuhoutai的目录下
root html/niuhoutai;
index index.html index.htm;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.html?s=$1 last;
break;
}
}
location /aa {
root html/huiniu;
index index.html index.htm;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.html?s=$1 last;
break;
}
}
location / {
root html/huiniu;
index index.html index.htm;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.html?s=$1 last;
break;
}
}
jeecgboot项目部署
最新推荐文章于 2024-07-20 17:52:30 发布