Closed linshao520 closed 8 months ago
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Routine inspection
your version
Problem Description Because it is deployed on the intranet, the intranet can only be accessed through a specific domain name and 80. After jumping through nginx configuration, I am always stuck on the home page. Reproduction Steps, Then I made the following configuration on nginx, which is responsible for jumping on the intranet location /fastgpt/ { proxy_pass http://192.168.137.111:3000/ } After the configuration is complete, visit the following address http://intranet domain name/fasgtgpt/, and you can see that you have jumped to the fastgpt page, but the relevant css, static resources, etc. on the page all report 404 errors, causing the page to stay stuck there. After communicating with the intranet administrator and releasing all interface restrictions, the problem still exists. expected outcome Through nginx configuration, fastgpt can be accessed normally through specific domain names and links.
Related screenshots
经过测试,发现可能是因为fastgpt加载css或者js等静态资源使用的是相对地址造成的。通过nginx链接跳转到fastgpt后,由于_next/xxx/yyy等相关文件还是在http://内网链接/_next/...下,而不是在http://内网链接/fastgpt/_next/...,导致跳转过去后的资源地址都提示404或者500
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
After testing, it was found that it may be caused by fastgpt loading static resources such as css or js using relative addresses. After jumping to fastgpt through the nginx link, the related files such as _next/xxx/yyy are still under http://intranet link/_next/... instead of http://intranet link/fastgpt/_next /..., causing the resource address after the jump to prompt 404 or 500
可以自己重新编译打包。
可以自己重新编译打包。
具体规则可以参考 nextjs 官网
请问你解决了吗,我也遇到了这个问题
例行检查
你的版本
问题描述 因为是内网部署的,内网只能通过特定域名和80访问。通过nginx配置跳转以后,一直卡在首页 复现步骤, 然后在内网负责跳转的nginx上做了如下配置 location /fastgpt/ { proxy_pass http://192.168.137.111:3000/ } 配置好以后,访问如下地址 http://内网域名/fasgtgpt/,可以显示跳转到了fastgpt的页面,但是页面上的相关css,静态资源等都报404错误,导致页面一直卡在那。 经过与内网管理员沟通,放开所有接口限制以后,问题依然存在。 预期结果 能通过nginx的配置,通过特定域名和链接能正常访问fastgpt
相关截图