dify
dify copied to clipboard
When deploying dify locally, the tool icon cannot be displayed in workflow and agent. The solution is to modify the local nginx configuration to achieve it.
Self Checks
- [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
- [x] I have searched for existing issues search for existing issues, including closed ones.
- [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
- [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
- [x] Please do not modify this template :) and fill in all the required fields.
Dify version
1.0.0
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
Modify the default.conf.template file under /dify/docker/nginx/conf.d,Add two rules:
# Rule 1: Handle application entry (keep /app/{id})
location ~ ^/app/[a-f0-9-]+$ {
# Forward the full path directly (without modifying the URL)
proxy_pass http://api:5001/;
include proxy.conf;
}
# Rule 2: When processing static resource requests (such as images), remove the /app/{id} prefix
location ~ ^/app/[a-f0-9-]+/(console/api/.*)$ {
# Rewrite path: remove /app/{id}, keep the following part
rewrite ^/app/[a-f0-9-]+/(.*)$ /$1 break;
proxy_pass http://api:5001;
include proxy.conf;
}
Restart nginx service
problem solving
✔️ Expected Behavior
Help everyone solve problems
❌ Actual Behavior
May be solved