如何配置才能使得通过nginx的域名+path(比如:https://my.com/dify)进行代理访问到dify #8269

Closed
opened 2026-02-21 18:24:47 -05:00 by yindo · 12 comments
Owner

Originally created by @xyfZzz on GitHub (Feb 14, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.15.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

目前我参考了issue中的一些历史答复,将域名对应的nginx进行了配置:

server {
    listen 80;
    server_name my.com;

    location /dify/ {
        proxy_pass http://127.0.0.1:8090/;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Prefix /dify;
        rewrite ^/dify/(.*)$ /$1 break;
    }
}

并且在.env中的如下一些变量进行了设置:

CONSOLE_API_URL=https://my.com/dify/api
CONSOLE_WEB_URL=https://my.com/dify
SERVICE_API_URL=https://my.com/dify/service
APP_API_URL=https://my.com/dify/app
APP_WEB_URL=https://my.com/dify

并对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/...

Originally created by @xyfZzz on GitHub (Feb 14, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.15.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 目前我参考了issue中的一些历史答复,将域名对应的nginx进行了配置: ``` server { listen 80; server_name my.com; location /dify/ { proxy_pass http://127.0.0.1:8090/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Prefix /dify; rewrite ^/dify/(.*)$ /$1 break; } } ``` 并且在.env中的如下一些变量进行了设置: ``` CONSOLE_API_URL=https://my.com/dify/api CONSOLE_WEB_URL=https://my.com/dify SERVICE_API_URL=https://my.com/dify/service APP_API_URL=https://my.com/dify/app APP_WEB_URL=https://my.com/dify ``` 并对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/...
yindo closed this issue 2026-02-21 18:24:47 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Feb 14, 2025):

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:

  1. How can I set up dify server behind a nginx reverse proxy? - This discussion is still open and might contain relevant information for setting up Nginx with Dify [1].

  2. Can the nginx of dify implement forwarding requests to the web and API through sub paths - This is another open discussion that could provide insights into configuring Nginx for subpath forwarding [2].

  3. nginx如何配置以下域名代理,例如:https://my.com/dify/作为系统入口,现在占用根域名/导致其他系统异常 - This closed issue might have some configuration examples or solutions that were discussed [3].

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

@dosubot[bot] commented on GitHub (Feb 14, 2025): <!-- Answer --> 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: 1. [How can I set up dify server behind a nginx reverse proxy?](https://github.com/langgenius/dify/discussions/7463) - This discussion is still open and might contain relevant information for setting up Nginx with Dify <sup>[[1]](https://github.com/langgenius/dify/discussions/7463)</sup>. 2. [Can the nginx of dify implement forwarding requests to the web and API through sub paths](https://github.com/langgenius/dify/discussions/6076) - This is another open discussion that could provide insights into configuring Nginx for subpath forwarding <sup>[[2]](https://github.com/langgenius/dify/discussions/6076)</sup>. 3. [nginx如何配置以下域名代理,例如:https://my.com/dify/作为系统入口,现在占用根域名/导致其他系统异常](https://github.com/langgenius/dify/issues/262) - This closed issue might have some configuration examples or solutions that were discussed <sup>[[3]](https://github.com/langgenius/dify/issues/262)</sup>. These threads might contain configuration examples or solutions that could help resolve the issue with accessing static files through the correct path. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=other)</sup>
Author
Owner

@xyfZzz commented on GitHub (Feb 14, 2025):

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:

  1. How can I set up dify server behind a nginx reverse proxy? - This discussion is still open and might contain relevant information for setting up Nginx with Dify [1].
  2. Can the nginx of dify implement forwarding requests to the web and API through sub paths - This is another open discussion that could provide insights into configuring Nginx for subpath forwarding [2].
  3. nginx如何配置以下域名代理,例如:https://my.com/dify/作为系统入口,现在占用根域名/导致其他系统异常 - This closed issue might have some configuration examples or solutions that were discussed [3].

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

这些讨论都没有解决这个问题啊?为什么这个问题这么多人提出且持续了这么久,但是都没有被解决呢?

@xyfZzz commented on GitHub (Feb 14, 2025): > 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: > > 1. [How can I set up dify server behind a nginx reverse proxy?](https://github.com/langgenius/dify/discussions/7463) - This discussion is still open and might contain relevant information for setting up Nginx with Dify [[1]](https://github.com/langgenius/dify/discussions/7463). > 2. [Can the nginx of dify implement forwarding requests to the web and API through sub paths](https://github.com/langgenius/dify/discussions/6076) - This is another open discussion that could provide insights into configuring Nginx for subpath forwarding [[2]](https://github.com/langgenius/dify/discussions/6076). > 3. [nginx如何配置以下域名代理,例如:https://my.com/dify/作为系统入口,现在占用根域名/导致其他系统异常](https://github.com/langgenius/dify/issues/262) - This closed issue might have some configuration examples or solutions that were discussed [[3]](https://github.com/langgenius/dify/issues/262). > > 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](https://dosu.dev), mention [@dosu](https://github.com/dosu)._ > > Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=other) 这些讨论都没有解决这个问题啊?为什么这个问题这么多人提出且持续了这么久,但是都没有被解决呢?
Author
Owner

@deershark commented on GitHub (Feb 14, 2025):

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:

  1. How can I set up dify server behind a nginx reverse proxy? - This discussion is still open and might contain relevant information for setting up Nginx with Dify [1].
  2. Can the nginx of dify implement forwarding requests to the web and API through sub paths - This is another open discussion that could provide insights into configuring Nginx for subpath forwarding [2].
  3. nginx如何配置以下域名代理,例如:https://my.com/dify/作为系统入口,现在占用根域名/导致其他系统异常 - This closed issue might have some configuration examples or solutions that were discussed [3].

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...

https://github.com/langgenius/dify/pull/13394

@deershark commented on GitHub (Feb 14, 2025): > > 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: > > > > 1. [How can I set up dify server behind a nginx reverse proxy?](https://github.com/langgenius/dify/discussions/7463) - This discussion is still open and might contain relevant information for setting up Nginx with Dify [[1]](https://github.com/langgenius/dify/discussions/7463). > > 2. [Can the nginx of dify implement forwarding requests to the web and API through sub paths](https://github.com/langgenius/dify/discussions/6076) - This is another open discussion that could provide insights into configuring Nginx for subpath forwarding [[2]](https://github.com/langgenius/dify/discussions/6076). > > 3. [nginx如何配置以下域名代理,例如:https://my.com/dify/作为系统入口,现在占用根域名/导致其他系统异常](https://github.com/langgenius/dify/issues/262) - This closed issue might have some configuration examples or solutions that were discussed [[3]](https://github.com/langgenius/dify/issues/262). > > > > 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](https://dosu.dev), mention [@dosu](https://github.com/dosu)._ > > Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=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... https://github.com/langgenius/dify/pull/13394
Author
Owner

@dc-vin commented on GitHub (Feb 14, 2025):

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:

  1. How can I set up dify server behind a nginx reverse proxy? - This discussion is still open and might contain relevant information for setting up Nginx with Dify [1].
  2. Can the nginx of dify implement forwarding requests to the web and API through sub paths - This is another open discussion that could provide insights into configuring Nginx for subpath forwarding [2].
  3. nginx如何配置以下域名代理,例如:https://my.com/dify/作为系统入口,现在占用根域名/导致其他系统异常 - This closed issue might have some configuration examples or solutions that were discussed [3].

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

这些讨论都没有解决这个问题啊?为什么这个问题这么多人提出且持续了这么久,但是都没有被解决呢?

Image
我这边原本服务器有nginx已经占用了端口,我的做法是把dify的nginx暴露的端口改掉,然后把原本服务器nginx代理到dify的nginx。

@dc-vin commented on GitHub (Feb 14, 2025): > > 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: > > > > 1. [How can I set up dify server behind a nginx reverse proxy?](https://github.com/langgenius/dify/discussions/7463) - This discussion is still open and might contain relevant information for setting up Nginx with Dify [[1]](https://github.com/langgenius/dify/discussions/7463). > > 2. [Can the nginx of dify implement forwarding requests to the web and API through sub paths](https://github.com/langgenius/dify/discussions/6076) - This is another open discussion that could provide insights into configuring Nginx for subpath forwarding [[2]](https://github.com/langgenius/dify/discussions/6076). > > 3. [nginx如何配置以下域名代理,例如:https://my.com/dify/作为系统入口,现在占用根域名/导致其他系统异常](https://github.com/langgenius/dify/issues/262) - This closed issue might have some configuration examples or solutions that were discussed [[3]](https://github.com/langgenius/dify/issues/262). > > > > 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](https://dosu.dev), mention [@dosu](https://github.com/dosu)._ > > Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=other) > > 这些讨论都没有解决这个问题啊?为什么这个问题这么多人提出且持续了这么久,但是都没有被解决呢? ![Image](https://github.com/user-attachments/assets/44c55b44-2055-4e4d-94ed-4b48189482ff) 我这边原本服务器有nginx已经占用了端口,我的做法是把dify的nginx暴露的端口改掉,然后把原本服务器nginx代理到dify的nginx。
Author
Owner

@xyfZzz commented on GitHub (Feb 14, 2025):

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:

  1. How can I set up dify server behind a nginx reverse proxy? - This discussion is still open and might contain relevant information for setting up Nginx with Dify [1].
  2. Can the nginx of dify implement forwarding requests to the web and API through sub paths - This is another open discussion that could provide insights into configuring Nginx for subpath forwarding [2].
  3. nginx如何配置以下域名代理,例如:https://my.com/dify/作为系统入口,现在占用根域名/导致其他系统异常 - This closed issue might have some configuration examples or solutions that were discussed [3].

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

这些讨论都没有解决这个问题啊?为什么这个问题这么多人提出且持续了这么久,但是都没有被解决呢?

Image 我这边原本服务器有nginx已经占用了端口,我的做法是把dify的nginx暴露的端口改掉,然后把原本服务器nginx代理到dify的nginx。

大佬,我也是用原本服务器的nginx代理到dify的nginx'http://127.0.0.1:8090/',但是配置的转发路径不是'/',而是'/dify',我是通过域名+"/dify/install"进行访问,但是网页端访问时静态文件还是通过域名+"/_next"进行访问,而不是通过域名+"/dify/_next"进行访问,从而出现了报错

@xyfZzz commented on GitHub (Feb 14, 2025): > > > 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: > > > > > > 1. [How can I set up dify server behind a nginx reverse proxy?](https://github.com/langgenius/dify/discussions/7463) - This discussion is still open and might contain relevant information for setting up Nginx with Dify [[1]](https://github.com/langgenius/dify/discussions/7463). > > > 2. [Can the nginx of dify implement forwarding requests to the web and API through sub paths](https://github.com/langgenius/dify/discussions/6076) - This is another open discussion that could provide insights into configuring Nginx for subpath forwarding [[2]](https://github.com/langgenius/dify/discussions/6076). > > > 3. [nginx如何配置以下域名代理,例如:https://my.com/dify/作为系统入口,现在占用根域名/导致其他系统异常](https://github.com/langgenius/dify/issues/262) - This closed issue might have some configuration examples or solutions that were discussed [[3]](https://github.com/langgenius/dify/issues/262). > > > > > > 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](https://dosu.dev), mention [@dosu](https://github.com/dosu)._ > > > Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=other) > > > > > > 这些讨论都没有解决这个问题啊?为什么这个问题这么多人提出且持续了这么久,但是都没有被解决呢? > > ![Image](https://github.com/user-attachments/assets/44c55b44-2055-4e4d-94ed-4b48189482ff) 我这边原本服务器有nginx已经占用了端口,我的做法是把dify的nginx暴露的端口改掉,然后把原本服务器nginx代理到dify的nginx。 大佬,我也是用原本服务器的nginx代理到dify的nginx'http://127.0.0.1:8090/',但是配置的转发路径不是'/',而是'/dify',我是通过域名+"/dify/install"进行访问,但是网页端访问时静态文件还是通过域名+"/_next"进行访问,而不是通过域名+"/dify/_next"进行访问,从而出现了报错
Author
Owner

@dc-vin commented on GitHub (Feb 14, 2025):

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:

  1. How can I set up dify server behind a nginx reverse proxy? - This discussion is still open and might contain relevant information for setting up Nginx with Dify [1].
  2. Can the nginx of dify implement forwarding requests to the web and API through sub paths - This is another open discussion that could provide insights into configuring Nginx for subpath forwarding [2].
  3. nginx如何配置以下域名代理,例如:https://my.com/dify/作为系统入口,现在占用根域名/导致其他系统异常 - This closed issue might have some configuration examples or solutions that were discussed [3].

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

这些讨论都没有解决这个问题啊?为什么这个问题这么多人提出且持续了这么久,但是都没有被解决呢?

Image 我这边原本服务器有nginx已经占用了端口,我的做法是把dify的nginx暴露的端口改掉,然后把原本服务器nginx代理到dify的nginx。

大佬,我也是用原本服务器的nginx代理到dify的nginx'http://127.0.0.1:8090/',但是配置的转发路径不是'/',而是'/dify',我是通过域名+"/dify/install"进行访问,但是网页端访问时静态文件还是通过域名+"/_next"进行访问,而不是通过域名+"/dify/_next"进行访问,从而出现了报错

这种nginx配置问题问下gpt就能解决吧

@dc-vin commented on GitHub (Feb 14, 2025): > > > > 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: > > > > > > > > 1. [How can I set up dify server behind a nginx reverse proxy?](https://github.com/langgenius/dify/discussions/7463) - This discussion is still open and might contain relevant information for setting up Nginx with Dify [[1]](https://github.com/langgenius/dify/discussions/7463). > > > > 2. [Can the nginx of dify implement forwarding requests to the web and API through sub paths](https://github.com/langgenius/dify/discussions/6076) - This is another open discussion that could provide insights into configuring Nginx for subpath forwarding [[2]](https://github.com/langgenius/dify/discussions/6076). > > > > 3. [nginx如何配置以下域名代理,例如:https://my.com/dify/作为系统入口,现在占用根域名/导致其他系统异常](https://github.com/langgenius/dify/issues/262) - This closed issue might have some configuration examples or solutions that were discussed [[3]](https://github.com/langgenius/dify/issues/262). > > > > > > > > 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](https://dosu.dev), mention [@dosu](https://github.com/dosu)._ > > > > Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=other) > > > > > > > > > 这些讨论都没有解决这个问题啊?为什么这个问题这么多人提出且持续了这么久,但是都没有被解决呢? > > > > > > ![Image](https://github.com/user-attachments/assets/44c55b44-2055-4e4d-94ed-4b48189482ff) 我这边原本服务器有nginx已经占用了端口,我的做法是把dify的nginx暴露的端口改掉,然后把原本服务器nginx代理到dify的nginx。 > > 大佬,我也是用原本服务器的nginx代理到dify的nginx'[http://127.0.0.1:8090/',但是配置的转发路径不是'/',而是'/dify',我是通过域名+"/dify/install"进行访问,但是网页端访问时静态文件还是通过域名+"/_next"进行访问,而不是通过域名+"/dify/_next"进行访问,从而出现了报错](http://127.0.0.1:8090/'%EF%BC%8C%E4%BD%86%E6%98%AF%E9%85%8D%E7%BD%AE%E7%9A%84%E8%BD%AC%E5%8F%91%E8%B7%AF%E5%BE%84%E4%B8%8D%E6%98%AF'/'%EF%BC%8C%E8%80%8C%E6%98%AF'/dify'%EF%BC%8C%E6%88%91%E6%98%AF%E9%80%9A%E8%BF%87%E5%9F%9F%E5%90%8D+%22/dify/install%22%E8%BF%9B%E8%A1%8C%E8%AE%BF%E9%97%AE%EF%BC%8C%E4%BD%86%E6%98%AF%E7%BD%91%E9%A1%B5%E7%AB%AF%E8%AE%BF%E9%97%AE%E6%97%B6%E9%9D%99%E6%80%81%E6%96%87%E4%BB%B6%E8%BF%98%E6%98%AF%E9%80%9A%E8%BF%87%E5%9F%9F%E5%90%8D+%22/_next%22%E8%BF%9B%E8%A1%8C%E8%AE%BF%E9%97%AE%EF%BC%8C%E8%80%8C%E4%B8%8D%E6%98%AF%E9%80%9A%E8%BF%87%E5%9F%9F%E5%90%8D+%22/dify/_next%22%E8%BF%9B%E8%A1%8C%E8%AE%BF%E9%97%AE%EF%BC%8C%E4%BB%8E%E8%80%8C%E5%87%BA%E7%8E%B0%E4%BA%86%E6%8A%A5%E9%94%99) 这种nginx配置问题问下gpt就能解决吧
Author
Owner

@xyfZzz commented on GitHub (Feb 14, 2025):

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:

  1. How can I set up dify server behind a nginx reverse proxy? - This discussion is still open and might contain relevant information for setting up Nginx with Dify [1].
  2. Can the nginx of dify implement forwarding requests to the web and API through sub paths - This is another open discussion that could provide insights into configuring Nginx for subpath forwarding [2].
  3. nginx如何配置以下域名代理,例如:https://my.com/dify/作为系统入口,现在占用根域名/导致其他系统异常 - This closed issue might have some configuration examples or solutions that were discussed [3].

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...

#13394

大佬牛逼啊,目前有可用的镜像进行替换吗?

@xyfZzz commented on GitHub (Feb 14, 2025): > > > 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: > > > > > > 1. [How can I set up dify server behind a nginx reverse proxy?](https://github.com/langgenius/dify/discussions/7463) - This discussion is still open and might contain relevant information for setting up Nginx with Dify [[1]](https://github.com/langgenius/dify/discussions/7463). > > > 2. [Can the nginx of dify implement forwarding requests to the web and API through sub paths](https://github.com/langgenius/dify/discussions/6076) - This is another open discussion that could provide insights into configuring Nginx for subpath forwarding [[2]](https://github.com/langgenius/dify/discussions/6076). > > > 3. [nginx如何配置以下域名代理,例如:https://my.com/dify/作为系统入口,现在占用根域名/导致其他系统异常](https://github.com/langgenius/dify/issues/262) - This closed issue might have some configuration examples or solutions that were discussed [[3]](https://github.com/langgenius/dify/issues/262). > > > > > > 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](https://dosu.dev), mention [@dosu](https://github.com/dosu)._ > > > Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=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... > > [#13394](https://github.com/langgenius/dify/pull/13394) 大佬牛逼啊,目前有可用的镜像进行替换吗?
Author
Owner

@dc-vin commented on GitHub (Feb 14, 2025):

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:

  1. How can I set up dify server behind a nginx reverse proxy? - This discussion is still open and might contain relevant information for setting up Nginx with Dify [1].
  2. Can the nginx of dify implement forwarding requests to the web and API through sub paths - This is another open discussion that could provide insights into configuring Nginx for subpath forwarding [2].
  3. nginx如何配置以下域名代理,例如:https://my.com/dify/作为系统入口,现在占用根域名/导致其他系统异常 - This closed issue might have some configuration examples or solutions that were discussed [3].

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...
#13394

大佬牛逼啊,目前有可用的镜像进行替换吗?

你为啥不改原本服务器的ningx配置,而要去改dify的nginx配置?

@dc-vin commented on GitHub (Feb 14, 2025): > > > > 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: > > > > > > > > 1. [How can I set up dify server behind a nginx reverse proxy?](https://github.com/langgenius/dify/discussions/7463) - This discussion is still open and might contain relevant information for setting up Nginx with Dify [[1]](https://github.com/langgenius/dify/discussions/7463). > > > > 2. [Can the nginx of dify implement forwarding requests to the web and API through sub paths](https://github.com/langgenius/dify/discussions/6076) - This is another open discussion that could provide insights into configuring Nginx for subpath forwarding [[2]](https://github.com/langgenius/dify/discussions/6076). > > > > 3. [nginx如何配置以下域名代理,例如:https://my.com/dify/作为系统入口,现在占用根域名/导致其他系统异常](https://github.com/langgenius/dify/issues/262) - This closed issue might have some configuration examples or solutions that were discussed [[3]](https://github.com/langgenius/dify/issues/262). > > > > > > > > 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](https://dosu.dev), mention [@dosu](https://github.com/dosu)._ > > > > Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=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... > > [#13394](https://github.com/langgenius/dify/pull/13394) > > 大佬牛逼啊,目前有可用的镜像进行替换吗? 你为啥不改原本服务器的ningx配置,而要去改dify的nginx配置?
Author
Owner

@xyfZzz commented on GitHub (Feb 14, 2025):

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:

  1. How can I set up dify server behind a nginx reverse proxy? - This discussion is still open and might contain relevant information for setting up Nginx with Dify [1].
  2. Can the nginx of dify implement forwarding requests to the web and API through sub paths - This is another open discussion that could provide insights into configuring Nginx for subpath forwarding [2].
  3. nginx如何配置以下域名代理,例如:https://my.com/dify/作为系统入口,现在占用根域名/导致其他系统异常 - This closed issue might have some configuration examples or solutions that were discussed [3].

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

这些讨论都没有解决这个问题啊?为什么这个问题这么多人提出且持续了这么久,但是都没有被解决呢?

Image 我这边原本服务器有nginx已经占用了端口,我的做法是把dify的nginx暴露的端口改掉,然后把原本服务器nginx代理到dify的nginx。

大佬,我也是用原本服务器的nginx代理到dify的nginx'http://127.0.0.1:8090/',但是配置的转发路径不是'/',而是'/dify',我是通过域名+"/dify/install"进行访问,但是网页端访问时静态文件还是通过域名+"/_next"进行访问,而不是通过域名+"/dify/_next"进行访问,从而出现了报错

这种nginx配置问题问下gpt就能解决吧

感觉这种跟前端技术有关吧,nginx再怎么配应该也搞不定,而且我不会任何前端技术,所以还是实事求是提issue比较好,如果问gpt一下就能解决,感觉这种问题应该也不至于存在到现在还没被解决了。

@xyfZzz commented on GitHub (Feb 14, 2025): > > > > > 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: > > > > > > > > > > 1. [How can I set up dify server behind a nginx reverse proxy?](https://github.com/langgenius/dify/discussions/7463) - This discussion is still open and might contain relevant information for setting up Nginx with Dify [[1]](https://github.com/langgenius/dify/discussions/7463). > > > > > 2. [Can the nginx of dify implement forwarding requests to the web and API through sub paths](https://github.com/langgenius/dify/discussions/6076) - This is another open discussion that could provide insights into configuring Nginx for subpath forwarding [[2]](https://github.com/langgenius/dify/discussions/6076). > > > > > 3. [nginx如何配置以下域名代理,例如:https://my.com/dify/作为系统入口,现在占用根域名/导致其他系统异常](https://github.com/langgenius/dify/issues/262) - This closed issue might have some configuration examples or solutions that were discussed [[3]](https://github.com/langgenius/dify/issues/262). > > > > > > > > > > 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](https://dosu.dev), mention [@dosu](https://github.com/dosu)._ > > > > > Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=other) > > > > > > > > > > > > 这些讨论都没有解决这个问题啊?为什么这个问题这么多人提出且持续了这么久,但是都没有被解决呢? > > > > > > > > > ![Image](https://github.com/user-attachments/assets/44c55b44-2055-4e4d-94ed-4b48189482ff) 我这边原本服务器有nginx已经占用了端口,我的做法是把dify的nginx暴露的端口改掉,然后把原本服务器nginx代理到dify的nginx。 > > > > > > 大佬,我也是用原本服务器的nginx代理到dify的nginx'[http://127.0.0.1:8090/',但是配置的转发路径不是'/',而是'/dify',我是通过域名+"/dify/install"进行访问,但是网页端访问时静态文件还是通过域名+"/_next"进行访问,而不是通过域名+"/dify/_next"进行访问,从而出现了报错](http://127.0.0.1:8090/'%EF%BC%8C%E4%BD%86%E6%98%AF%E9%85%8D%E7%BD%AE%E7%9A%84%E8%BD%AC%E5%8F%91%E8%B7%AF%E5%BE%84%E4%B8%8D%E6%98%AF'/'%EF%BC%8C%E8%80%8C%E6%98%AF'/dify'%EF%BC%8C%E6%88%91%E6%98%AF%E9%80%9A%E8%BF%87%E5%9F%9F%E5%90%8D+%22/dify/install%22%E8%BF%9B%E8%A1%8C%E8%AE%BF%E9%97%AE%EF%BC%8C%E4%BD%86%E6%98%AF%E7%BD%91%E9%A1%B5%E7%AB%AF%E8%AE%BF%E9%97%AE%E6%97%B6%E9%9D%99%E6%80%81%E6%96%87%E4%BB%B6%E8%BF%98%E6%98%AF%E9%80%9A%E8%BF%87%E5%9F%9F%E5%90%8D+%22/_next%22%E8%BF%9B%E8%A1%8C%E8%AE%BF%E9%97%AE%EF%BC%8C%E8%80%8C%E4%B8%8D%E6%98%AF%E9%80%9A%E8%BF%87%E5%9F%9F%E5%90%8D+%22/dify/_next%22%E8%BF%9B%E8%A1%8C%E8%AE%BF%E9%97%AE%EF%BC%8C%E4%BB%8E%E8%80%8C%E5%87%BA%E7%8E%B0%E4%BA%86%E6%8A%A5%E9%94%99) > > 这种nginx配置问题问下gpt就能解决吧 感觉这种跟前端技术有关吧,nginx再怎么配应该也搞不定,而且我不会任何前端技术,所以还是实事求是提issue比较好,如果问gpt一下就能解决,感觉这种问题应该也不至于存在到现在还没被解决了。
Author
Owner

@xyfZzz commented on GitHub (Feb 14, 2025):

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:

  1. How can I set up dify server behind a nginx reverse proxy? - This discussion is still open and might contain relevant information for setting up Nginx with Dify [1].
  2. Can the nginx of dify implement forwarding requests to the web and API through sub paths - This is another open discussion that could provide insights into configuring Nginx for subpath forwarding [2].
  3. nginx如何配置以下域名代理,例如:https://my.com/dify/作为系统入口,现在占用根域名/导致其他系统异常 - This closed issue might have some configuration examples or solutions that were discussed [3].

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...
#13394

大佬牛逼啊,目前有可用的镜像进行替换吗?

你为啥不改原本服务器的ningx配置,而要去改dify的nginx配置?

我没有改dify的nginx配置,我改的就是原本服务器的ningx配置

@xyfZzz commented on GitHub (Feb 14, 2025): > > > > > 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: > > > > > > > > > > 1. [How can I set up dify server behind a nginx reverse proxy?](https://github.com/langgenius/dify/discussions/7463) - This discussion is still open and might contain relevant information for setting up Nginx with Dify [[1]](https://github.com/langgenius/dify/discussions/7463). > > > > > 2. [Can the nginx of dify implement forwarding requests to the web and API through sub paths](https://github.com/langgenius/dify/discussions/6076) - This is another open discussion that could provide insights into configuring Nginx for subpath forwarding [[2]](https://github.com/langgenius/dify/discussions/6076). > > > > > 3. [nginx如何配置以下域名代理,例如:https://my.com/dify/作为系统入口,现在占用根域名/导致其他系统异常](https://github.com/langgenius/dify/issues/262) - This closed issue might have some configuration examples or solutions that were discussed [[3]](https://github.com/langgenius/dify/issues/262). > > > > > > > > > > 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](https://dosu.dev), mention [@dosu](https://github.com/dosu)._ > > > > > Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=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... > > > [#13394](https://github.com/langgenius/dify/pull/13394) > > > > > > 大佬牛逼啊,目前有可用的镜像进行替换吗? > > 你为啥不改原本服务器的ningx配置,而要去改dify的nginx配置? 我没有改dify的nginx配置,我改的就是原本服务器的ningx配置
Author
Owner

@deershark commented on GitHub (Feb 14, 2025):

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:

  1. How can I set up dify server behind a nginx reverse proxy? - This discussion is still open and might contain relevant information for setting up Nginx with Dify [1].
  2. Can the nginx of dify implement forwarding requests to the web and API through sub paths - This is another open discussion that could provide insights into configuring Nginx for subpath forwarding [2].
  3. nginx如何配置以下域名代理,例如:https://my.com/dify/作为系统入口,现在占用根域名/导致其他系统异常 - This closed issue might have some configuration examples or solutions that were discussed [3].

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...
#13394

大佬牛逼啊,目前有可用的镜像进行替换吗?

自定义子路径的话,这个需要自己编镜像,拉我fork的仓库,进入 web 文件夹,然后指令:docker build . -t dify-base-path:latest --build-arg NEXT_PUBLIC_BASE_PATH=/custom-path (/custom-path改成自己的路径)就好了,部署的时候也要把 NEXT_PUBLIC_BASE_PATH 环境变量加上

@deershark commented on GitHub (Feb 14, 2025): > > > > 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: > > > > > > > > 1. [How can I set up dify server behind a nginx reverse proxy?](https://github.com/langgenius/dify/discussions/7463) - This discussion is still open and might contain relevant information for setting up Nginx with Dify [[1]](https://github.com/langgenius/dify/discussions/7463). > > > > 2. [Can the nginx of dify implement forwarding requests to the web and API through sub paths](https://github.com/langgenius/dify/discussions/6076) - This is another open discussion that could provide insights into configuring Nginx for subpath forwarding [[2]](https://github.com/langgenius/dify/discussions/6076). > > > > 3. [nginx如何配置以下域名代理,例如:https://my.com/dify/作为系统入口,现在占用根域名/导致其他系统异常](https://github.com/langgenius/dify/issues/262) - This closed issue might have some configuration examples or solutions that were discussed [[3]](https://github.com/langgenius/dify/issues/262). > > > > > > > > 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](https://dosu.dev), mention [@dosu](https://github.com/dosu)._ > > > > Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/d4a315c0-c5c0-4625-a425-5bbb3458fb61?feedback_type=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... > > [#13394](https://github.com/langgenius/dify/pull/13394) > > 大佬牛逼啊,目前有可用的镜像进行替换吗? 自定义子路径的话,这个需要自己编镜像,拉我fork的仓库,进入 `web` 文件夹,然后指令:`docker build . -t dify-base-path:latest --build-arg NEXT_PUBLIC_BASE_PATH=/custom-path` (/custom-path改成自己的路径)就好了,部署的时候也要把 `NEXT_PUBLIC_BASE_PATH` 环境变量加上
Author
Owner

@crazywoola commented on GitHub (Feb 14, 2025):

Close due to https://github.com/langgenius/dify/issues/1542

@crazywoola commented on GitHub (Feb 14, 2025): Close due to https://github.com/langgenius/dify/issues/1542
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#8269