40 lines
1.1 KiB
Text
40 lines
1.1 KiB
Text
|
|
## -----------------------------------------------------------------------------
|
||
|
|
## SWAG proxy config for Dify
|
||
|
|
## Domain: dify.ld50.xyz
|
||
|
|
## Upstream: dify-nginx:80 (shared Docker network: ${NETWORKS_EXTERNAL_NAME:-swag})
|
||
|
|
##
|
||
|
|
## Install:
|
||
|
|
## 1) Copy this file into SWAG: /config/nginx/proxy-confs/dify.subdomain.conf
|
||
|
|
## 2) Ensure both stacks share the same external Docker network (e.g. `swag`).
|
||
|
|
## 3) Reload SWAG.
|
||
|
|
## -----------------------------------------------------------------------------
|
||
|
|
|
||
|
|
server {
|
||
|
|
listen 443 ssl;
|
||
|
|
listen [::]:443 ssl;
|
||
|
|
|
||
|
|
server_name dify.*;
|
||
|
|
|
||
|
|
include /config/nginx/ssl.conf;
|
||
|
|
|
||
|
|
# Large file uploads for document datasets
|
||
|
|
client_max_body_size 100M;
|
||
|
|
|
||
|
|
location / {
|
||
|
|
include /config/nginx/proxy.conf;
|
||
|
|
|
||
|
|
set $upstream_app dify-nginx;
|
||
|
|
set $upstream_port 80;
|
||
|
|
set $upstream_proto http;
|
||
|
|
|
||
|
|
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
||
|
|
|
||
|
|
# Keep websocket compatibility explicit
|
||
|
|
proxy_set_header Upgrade $http_upgrade;
|
||
|
|
proxy_set_header Connection "upgrade";
|
||
|
|
|
||
|
|
proxy_read_timeout 3600s;
|
||
|
|
proxy_send_timeout 3600s;
|
||
|
|
}
|
||
|
|
}
|