Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upnginx非根目录部署无法正常访问 #4085
Comments
This comment has been minimized.
This comment has been minimized.
|
https://umijs.org/zh/config/#base |
chenshuai2144
added
the
😸 Documentation
label
Apr 26, 2019
This comment has been minimized.
This comment has been minimized.
您好,这个base 跟publicPath已经配置了。能帮我看下,是哪个地址配置错了吗,我现在访问http://visitortest.skyingidea.com/serverfortemp/visitor_web会跳转到根目录的antd mobile项目去 |
This comment has been minimized.
This comment has been minimized.
Tzng
commented
Apr 26, 2019
•
|
我用express可以部署非根目录。这么配置的
然后express这么写的
server.js的同级目录有一个demo文件夹,然后这个文件夹里面放打包好的代码 然后我的nginx直接配置转发到server.js启动的端口
|
This comment has been minimized.
This comment has been minimized.
sunguoxing0628
commented
Apr 27, 2019
|
@zxingkong 我这里直接是用的80端口,没有系统名称,访问地址为
其中 我觉得你可以尝试两个操作:
|
This comment has been minimized.
This comment has been minimized.
额,按照您说的,我修改了下配置,发现这样访问是会404 |
This comment has been minimized.
This comment has been minimized.
sunguoxing0628
commented
Apr 29, 2019
你是否注意到 |
This comment has been minimized.
This comment has been minimized.
这样配置: |
zxingkong commentedApr 25, 2019
•
edited
匹配不到nginx配置的目录,会匹配到根目录的web项目中�去。



看了所以相关的issue,仍然没解决。前端新手,跪求指教。。。
相关配置:
config.js
nginx配置
项目实际部署路径