How to deploy dify under two nginx layer? #27656
Replies: 2 comments 10 replies
-
|
To deploy Dify behind two nginx layers with a subpath like Here's what you need to do:
Troubleshooting:
Summary:
This setup ensures all requests (including static assets and API calls) work correctly through both nginx layers with the To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
|
Found a new environment variable TRIGGER_URL in the .env of dify 1.10.0. What is this variable used for? Does it conflict with the ones above? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Self Checks
Content
I used 'docker compose up -d' to start dify on 10.142.157.37 . The exposed nginx port is 5094:5094. My team has a unified nginx that all external requests must go through: 10.142.157.36:8080. So an external must go through 2 nginx layers: the unified nginx and the dify nginx.
My current setting for the unified nginx is:
I modified some environment varibles for docker compose:
Also, I modified ~dify/web/utils/var-basePath.js as:
modified some varibles in ~/dify/web/.env.local as:
However, I found that when testing external requests, the browser still automatically request http://10.142.157.36:8080/apps?_rsc=1dl4p instead of http://10.142.157.36:8080/dify/apps?_rsc=1dl4p.
So How can I solve this to make sure everything works right for 2 nginx layer (not only signin) ?
Beta Was this translation helpful? Give feedback.
All reactions