labring / FastGPT

FastGPT is a knowledge-based platform built on the LLMs, offers a comprehensive suite of out-of-the-box capabilities such as data processing, RAG retrieval, and visual AI workflow orchestration, letting you easily develop and deploy complex question-answering systems without the need for extensive setup or configuration.
https://tryfastgpt.ai
Other
17.49k stars 4.69k forks source link

Hello, I want to access fastgt normally on http://localhost:3000/test. Can this requirement be realized? #668

Closed TheChalice closed 6 months ago

TheChalice commented 9 months ago

例行检查

功能描述 您好,我想在http://localhost:3000/test上正常访问fastgt,请问这个需求可以实现吗,我在next.config.js里加了 basePath: '/test',但这样就会让api全部404,请问您这边有什么好的解决方案吗 应用场景

相关示例

c121914yu commented 9 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Routine inspection

Function description Hello, I want to access fastgt normally on http://localhost:3000/test. Can this requirement be achieved? I added basePath: '/test' to next.config.js, but this will make the api all 404, do you have any good solutions here? Application Scenario

Related Examples

c121914yu commented 9 months ago

这个可以考虑 nginx 重定向。

c121914yu commented 9 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Is it written like this? server { listen 8888;

server_name 10.1.251.131;

location /test/ {
    rewrite ^/test/(.*)$ /$1 break;
    proxy  
TheChalice commented 9 months ago

请问可以这样写吗

c121914yu commented 9 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Could you please write it like this?

TheChalice commented 9 months ago

nginx.conf.txt

c121914yu commented 9 months ago

nginx.conf.txt

估计不太行,在接口中使用的都是 / 的相对域名地址。

c121914yu commented 9 months ago

nginx.conf.txt

估计不太行,在接口中使用的都是 / 的相对域名地址。

我只设置过,拦截 /api,转向其他地方。

Timerunning commented 2 months ago

nginx.conf.txt

请你问解决二级路由重定向的问题了吗,我也遇到了和你相同的问题