2024-06-28 17:37:52 +08:00
|
|
|
# Please do not directly edit this file. Instead, modify the .env variables related to NGINX configuration.
|
|
|
|
|
2023-05-15 08:51:32 +08:00
|
|
|
server {
|
2024-07-01 01:11:33 +08:00
|
|
|
listen ${NGINX_PORT};
|
2024-06-28 17:37:52 +08:00
|
|
|
server_name ${NGINX_SERVER_NAME};
|
2023-05-15 08:51:32 +08:00
|
|
|
|
2025-03-08 11:04:53 +08:00
|
|
|
# Rule 1: Handle application entry points (preserve /app/{id})
|
|
|
|
location ~ ^/app/[a-f0-9-]+$ {
|
|
|
|
proxy_pass http://api:5001;
|
|
|
|
include proxy.conf;
|
|
|
|
}
|
|
|
|
|
|
|
|
# Rule 2: Handle static resource requests (remove /app/{id} prefix)
|
|
|
|
location ~ ^/app/[a-f0-9-]+/(console/api/.*)$ {
|
|
|
|
rewrite ^/app/[a-f0-9-]+/(.*)$ /$1 break;
|
|
|
|
proxy_pass http://api:5001;
|
|
|
|
include proxy.conf;
|
|
|
|
}
|
|
|
|
|
2023-05-15 08:51:32 +08:00
|
|
|
location /console/api {
|
|
|
|
proxy_pass http://api:5001;
|
|
|
|
include proxy.conf;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /api {
|
|
|
|
proxy_pass http://api:5001;
|
|
|
|
include proxy.conf;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /v1 {
|
|
|
|
proxy_pass http://api:5001;
|
|
|
|
include proxy.conf;
|
|
|
|
}
|
|
|
|
|
2023-11-13 22:05:46 +08:00
|
|
|
location /files {
|
|
|
|
proxy_pass http://api:5001;
|
|
|
|
include proxy.conf;
|
|
|
|
}
|
|
|
|
|
2025-02-17 17:05:13 +08:00
|
|
|
location /explore {
|
|
|
|
proxy_pass http://web:3000;
|
|
|
|
include proxy.conf;
|
|
|
|
}
|
|
|
|
|
2025-02-28 10:49:19 +08:00
|
|
|
location /e/ {
|
2025-02-17 17:05:13 +08:00
|
|
|
proxy_pass http://plugin_daemon:5002;
|
|
|
|
proxy_set_header Dify-Hook-Url $scheme://$host$request_uri;
|
|
|
|
include proxy.conf;
|
|
|
|
}
|
|
|
|
|
2023-05-15 08:51:32 +08:00
|
|
|
location / {
|
|
|
|
proxy_pass http://web:3000;
|
|
|
|
include proxy.conf;
|
|
|
|
}
|
2024-03-26 10:37:43 +08:00
|
|
|
|
2024-07-31 13:21:56 +08:00
|
|
|
# placeholder for acme challenge location
|
|
|
|
${ACME_CHALLENGE_LOCATION}
|
|
|
|
|
2024-06-28 17:37:52 +08:00
|
|
|
# placeholder for https config defined in https.conf.template
|
|
|
|
${HTTPS_CONFIG}
|
2024-03-26 10:37:43 +08:00
|
|
|
}
|