Replies: 4 comments 7 replies
-
Hi @wxup! I'm here to help you with any bugs, questions, or contributions. I'll do my best to assist you while we wait for a human maintainer. To set up the Dify server behind an Nginx reverse proxy and under the prefix server {
listen 80;
server_name your_domain.com;
location /apps/dify/ {
proxy_pass http://localhost:your_dify_port/;
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 /apps/dify;
rewrite ^/apps/dify/(.*)$ /$1 break;
}
} Replace Additionally, ensure that the following environment variables in your CONSOLE_API_URL: http://your_domain.com/apps/dify/api
CONSOLE_WEB_URL: http://your_domain.com/apps/dify
SERVICE_API_URL: http://your_domain.com/apps/dify/service
APP_API_URL: http://your_domain.com/apps/dify/app
APP_WEB_URL: http://your_domain.com/apps/dify This will help avoid CORS issues and ensure that the front-end and back-end communicate correctly [1][2]. |
Beta Was this translation helpful? Give feedback.
-
Same request here, please help follow up. I am new to dev🙏🏻, After a lot of try and errors, i successfully add prefix /xxx/dify to the url.. however, even i did that process, my niginx still cant work well with dify container. Here are some findings:
|
Beta Was this translation helpful? Give feedback.
-
Hi, the setting in the nginx works for us which point the xyz.com/dify to dify service, while xyz.com points to other site.
|
Beta Was this translation helpful? Give feedback.
-
我也遇到了这个问题,我的服务器只有80端口可用,于是我想把Dify用nginx映射到80端口上的/dify路径下,实现路径复用,但是似乎上面讨论的配置不起作用 |
Beta Was this translation helpful? Give feedback.
-
Self Checks
Provide a description of requested docs changes
I need to deploy dify behind a nginx, and under the prefix
/apps/dify/
. I searched through the documentation, it seems there are not enough information in the documentation to help me achieve this. Anyone can help?Beta Was this translation helpful? Give feedback.
All reactions