error404,after the release of the application, cannot be accessed through the public access URL of the application. #12576

Closed
opened 2026-02-21 19:08:03 -05:00 by yindo · 3 comments
Owner

Originally created by @wsndng on GitHub (Apr 6, 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.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

DIFY version 0.15.2, after the release of the application, cannot be accessed through the public access URL of the application. The address is http://localip:port/chat/aeqoZrB2ebbA4dX7 A 404 error is reported, and the page information returned is: Not Found
The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
But when accessing the API, the credentials address is http://localip:port/v1/
Return information: {"welcome": "Dify OpenAPI", "api_version": "v1", "server_version": "0.15.2"}

✔️ Expected Behavior

I am using K8S deployment. What is the cause of this problem and how should I check and modify the configuration

Actual Behavior

No response

Originally created by @wsndng on GitHub (Apr 6, 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.2 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce DIFY version 0.15.2, after the release of the application, cannot be accessed through the public access URL of the application. The address is http://localip:port/chat/aeqoZrB2ebbA4dX7 A 404 error is reported, and the page information returned is: Not Found The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. But when accessing the API, the credentials address is http://localip:port/v1/ Return information: {"welcome": "Dify OpenAPI", "api_version": "v1", "server_version": "0.15.2"} ### ✔️ Expected Behavior I am using K8S deployment. What is the cause of this problem and how should I check and modify the configuration ### ❌ Actual Behavior _No response_
yindo added the 🙏 help wanted label 2026-02-21 19:08:03 -05:00
yindo closed this issue 2026-02-21 19:08:03 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Apr 6, 2025):

Hello @wsndng! I'm Dosu, your friendly bot here to help you tackle bugs, answer your questions, and assist with contributions while you wait for a human maintainer. Let's get started on resolving your issue!

I found some similar threads that might help you resolve the 404 error issue:

  1. Help Problem starting the project - This discussion is unsolved but might provide some insights into similar issues.
  2. Cannot access self-hosted Dify through https - Another unsolved discussion that might be relevant.

Additionally, there are some closed issues with suggested solutions:

  • One issue suggests that the 404 error could be due to Nginx reverse proxy configuration. Ensure that NGINX_SERVER_NAME, NGINX_PORT, and EXPOSE_NGINX_PORT are correctly set. If HTTPS is enabled, check SSL certificates and related ports. Also, verify environment variables in the docker-compose.yaml file and CORS settings [1].

  • Another issue suggests checking the Nginx configuration to ensure requests are forwarded correctly, verifying environment variables related to URLs and ports, and checking Docker and Nginx logs for errors. It also recommends ensuring the API service is running and accessible [2].

These steps should help you troubleshoot and resolve the 404 error in your Dify deployment.

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 (Apr 6, 2025): <!-- Greeting --> Hello @wsndng! I'm [Dosu](https://dosu.dev), your friendly bot here to help you tackle bugs, answer your questions, and assist with contributions while you wait for a human maintainer. Let's get started on resolving your issue! <!-- Answer --> I found some similar threads that might help you resolve the 404 error issue: 1. [Help Problem starting the project](https://github.com/langgenius/dify/discussions/9751) - This discussion is unsolved but might provide some insights into similar issues. 2. [Cannot access self-hosted Dify through https](https://github.com/langgenius/dify/discussions/6737) - Another unsolved discussion that might be relevant. Additionally, there are some closed issues with suggested solutions: - One issue suggests that the 404 error could be due to Nginx reverse proxy configuration. Ensure that `NGINX_SERVER_NAME`, `NGINX_PORT`, and `EXPOSE_NGINX_PORT` are correctly set. If HTTPS is enabled, check SSL certificates and related ports. Also, verify environment variables in the `docker-compose.yaml` file and CORS settings <sup>[[1]](https://github.com/langgenius/dify/issues/8819)</sup>. - Another issue suggests checking the Nginx configuration to ensure requests are forwarded correctly, verifying environment variables related to URLs and ports, and checking Docker and Nginx logs for errors. It also recommends ensuring the API service is running and accessible <sup>[[2]](https://github.com/langgenius/dify/issues/13895)</sup>. These steps should help you troubleshoot and resolve the 404 error in your Dify deployment. <!-- 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/70207867-d1c2-4c99-be44-76f0a57c6bd0?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/70207867-d1c2-4c99-be44-76f0a57c6bd0?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/70207867-d1c2-4c99-be44-76f0a57c6bd0?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/70207867-d1c2-4c99-be44-76f0a57c6bd0?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/70207867-d1c2-4c99-be44-76f0a57c6bd0?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/70207867-d1c2-4c99-be44-76f0a57c6bd0?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/70207867-d1c2-4c99-be44-76f0a57c6bd0?feedback_type=other)</sup>
Author
Owner

@helloandworlder commented on GitHub (Apr 6, 2025):

Hi @wsndng,

Thanks for your report and for confirming the environment details. Based on your description, it seems that the API is accessible (/v1/ returns expected data), but the application’s public access URL (e.g., /chat/) is returning a 404 error.

Let me walk you through some possible causes and steps to troubleshoot this issue.

🔍 Possible Causes
1. Frontend routing not correctly exposed
Dify’s /chat/ endpoint is handled by the frontend app, typically served through the web container. If this path is not accessible, it may be due to:
• A misconfigured nginx or ingress controller.
• Missing frontend static assets.
• The application was not properly released or the release is not public.
2. K8s Ingress configuration issue
Since you are using Kubernetes (K8s), make sure the ingress routes /chat/* paths to the correct service. If only /v1/ works, it could be that your ingress is only forwarding API requests.
3. App release status or app ID issue
The app with ID aeqoZrB2ebbA4dX7 may not exist, or may not have been properly published. A malformed or expired app ID may also return 404.

Steps to Troubleshoot

  1. Confirm App Existence

Run the following to confirm the app is published:

Inside the container or via Dify Admin DB access

Confirm if the app ID exists and is set to PUBLIC

Alternatively, access the admin panel and check if the app is published, and the access URL is correct.

  1. Check Web Frontend Status

Make sure the web container or frontend service is running:

kubectl get pods -n

Look for web/frontend pod status

kubectl logs -n

Also confirm the service is exposing /chat route.

  1. Review Ingress / Nginx Rules

If you are using Ingress (e.g., NGINX Ingress Controller), make sure the rules for /chat/* are forwarded to the frontend service, not the API service.

Example rule (YAML snippet):

rules:

  • http:
    paths:
    - path: /chat(/|$)(.*)
    pathType: Prefix
    backend:
    service:
    name: dify-web
    port:
    number: 80
  1. Test with Port-forwarding

To rule out ingress issues, try this:

kubectl port-forward svc/dify-web 8080:80 -n

Then access: http://localhost:8080/chat/

If this works, the issue is definitely in ingress or reverse proxy config.

📄 Additional Info to Provide (if unresolved)

If the issue persists, please help us with the following:
• Your Ingress config (redact sensitive info)
• Output of kubectl get all -n
• Confirm if you’re using Helm or raw YAML for deployment
• Output of kubectl logs -n

Let us know what you find. We’ll help you get it resolved!

Best regards,
Dify Team 🧠

@helloandworlder commented on GitHub (Apr 6, 2025): Hi @wsndng, Thanks for your report and for confirming the environment details. Based on your description, it seems that the API is accessible (/v1/ returns expected data), but the application’s public access URL (e.g., /chat/<app-id>) is returning a 404 error. Let me walk you through some possible causes and steps to troubleshoot this issue. ⸻ 🔍 Possible Causes 1. Frontend routing not correctly exposed Dify’s /chat/<app-id> endpoint is handled by the frontend app, typically served through the web container. If this path is not accessible, it may be due to: • A misconfigured nginx or ingress controller. • Missing frontend static assets. • The application was not properly released or the release is not public. 2. K8s Ingress configuration issue Since you are using Kubernetes (K8s), make sure the ingress routes /chat/* paths to the correct service. If only /v1/ works, it could be that your ingress is only forwarding API requests. 3. App release status or app ID issue The app with ID aeqoZrB2ebbA4dX7 may not exist, or may not have been properly published. A malformed or expired app ID may also return 404. ⸻ ✅ Steps to Troubleshoot 1. Confirm App Existence Run the following to confirm the app is published: # Inside the container or via Dify Admin DB access # Confirm if the app ID exists and is set to PUBLIC Alternatively, access the admin panel and check if the app is published, and the access URL is correct. 2. Check Web Frontend Status Make sure the web container or frontend service is running: kubectl get pods -n <namespace> # Look for web/frontend pod status kubectl logs <web-pod-name> -n <namespace> Also confirm the service is exposing /chat route. 3. Review Ingress / Nginx Rules If you are using Ingress (e.g., NGINX Ingress Controller), make sure the rules for /chat/* are forwarded to the frontend service, not the API service. Example rule (YAML snippet): rules: - http: paths: - path: /chat(/|$)(.*) pathType: Prefix backend: service: name: dify-web port: number: 80 4. Test with Port-forwarding To rule out ingress issues, try this: kubectl port-forward svc/dify-web 8080:80 -n <namespace> # Then access: http://localhost:8080/chat/<app-id> If this works, the issue is definitely in ingress or reverse proxy config. ⸻ 📄 Additional Info to Provide (if unresolved) If the issue persists, please help us with the following: • Your Ingress config (redact sensitive info) • Output of kubectl get all -n <namespace> • Confirm if you’re using Helm or raw YAML for deployment • Output of kubectl logs <web-pod> -n <namespace> ⸻ Let us know what you find. We’ll help you get it resolved! Best regards, Dify Team 🧠
Author
Owner

@dosubot[bot] commented on GitHub (May 8, 2025):

Hi, @wsndng. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale.

Issue Summary:

  • You encountered a 404 error when accessing your self-hosted Dify application via its public URL after deploying version 0.15.2.
  • The API endpoint remains accessible, indicating a potential issue with the frontend or routing.
  • I suggested reviewing Nginx reverse proxy configurations and environment variables.
  • @helloandworlder provided detailed troubleshooting steps, including checking frontend routing, Kubernetes ingress configuration, and app release status.

Next Steps:

  • Please confirm if this issue is still relevant with the latest version of the Dify repository. If it is, you can keep the discussion open by commenting here.
  • If there is no further activity, this issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (May 8, 2025): Hi, @wsndng. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog. I'm marking this issue as stale. **Issue Summary:** - You encountered a 404 error when accessing your self-hosted Dify application via its public URL after deploying version 0.15.2. - The API endpoint remains accessible, indicating a potential issue with the frontend or routing. - I suggested reviewing Nginx reverse proxy configurations and environment variables. - @helloandworlder provided detailed troubleshooting steps, including checking frontend routing, Kubernetes ingress configuration, and app release status. **Next Steps:** - Please confirm if this issue is still relevant with the latest version of the Dify repository. If it is, you can keep the discussion open by commenting here. - If there is no further activity, this issue will be automatically closed in 15 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12576