-
Notifications
You must be signed in to change notification settings - Fork 9.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如何配置才能使得通过nginx的域名+path(比如:https://my.com/dify)进行代理访问到dify #13735
Comments
I found some similar discussions that might be helpful for your issue with configuring Nginx to proxy requests to Dify using a domain and path:
These threads might contain configuration examples or solutions that could help resolve the issue with accessing static files through the correct path. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other |
这些讨论都没有解决这个问题啊?为什么这个问题这么多人提出且持续了这么久,但是都没有被解决呢? |
I followed the NextJS rules, added sub-path environment variables to support (need to re-package and deploy), corrected the front-end resources and some redirect routes, and did not encounter any major problems in my personal use. I submitted a PR but the official has not reviewed it yet... |
|
大佬,我也是用原本服务器的nginx代理到dify的nginx'http://127.0.0.1:8090/',但是配置的转发路径不是'/',而是'/dify',我是通过域名+"/dify/install"进行访问,但是网页端访问时静态文件还是通过域名+"/_next"进行访问,而不是通过域名+"/dify/_next"进行访问,从而出现了报错 |
这种nginx配置问题问下gpt就能解决吧 |
大佬牛逼啊,目前有可用的镜像进行替换吗? |
你为啥不改原本服务器的ningx配置,而要去改dify的nginx配置? |
感觉这种跟前端技术有关吧,nginx再怎么配应该也搞不定,而且我不会任何前端技术,所以还是实事求是提issue比较好,如果问gpt一下就能解决,感觉这种问题应该也不至于存在到现在还没被解决了。 |
我没有改dify的nginx配置,我改的就是原本服务器的ningx配置 |
自定义子路径的话,这个需要自己编镜像,拉我fork的仓库,进入 |
Close due to #1542 |
Self Checks
Dify version
0.15.3
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
目前我参考了issue中的一些历史答复,将域名对应的nginx进行了配置:
并且在.env中的如下一些变量进行了设置:
并对dify通过docker compose部署后,依旧无法通过https://my.com/dify/install或https://my.com/dify/apps正常访问到dify。
目前网页报错,访问js和css静态文件时还是去访问https://my.com/_next/...导致返回304错误,而不是访问https://my.com/dify/_next/...
请问有没有正确的操作案例可供参考?还是说目前还有bug?
✔️ Expected Behavior
希望通过https://my.com/dify/install成功访问到dify
❌ Actual Behavior
目前网页报错,访问js和css静态文件时还是去访问https://my.com/_next/...导致返回304错误,而不是访问https://my.com/dify/_next/...
The text was updated successfully, but these errors were encountered: