Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

现在需要在一个老的angluar1.x项目中通过ifaram嵌套一个新的vue项目 老的项目的静态angluar采用的是nginx转发serve配置如下
image.png
然后这个是我新写的vue项目静态启动地址
image.png
vue.config.js相关配置
image.png

image.png
vue项目设置路由的base地址
image.png
下图是nginx新增的vue项目配置
image.png
现在就说遇到点击进入http://localhost:9001/newAccount/#/accountList这个地址app.js
一直处于pending状态最后cancel

image.png
查了一下nginx的日志报错说超时
image.png
这个是我vue项目单独启动的时候看到的界面
image.png
不知道是什么原因搞了好几天了。。实在想不出原因本来想着监听9527这个端口然后再把api接口重定向到测试环境 但是nginx直接启动失败!
这种两个库怎么样才能满足需求呢。。。头大


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
198 views
Welcome To Ask or Share your Answers For Others

1 Answer

location /newAccount/  {
    proxy_pass http://localhost:9527;
    proxy_redirect off;
    
    ......
}

这样不行吗?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...