upstream dify_web_proxy {
server 127.0.0.1:3000;
}
server {
listen 80;
server_name dify.thape.com.cn;
return 301 https://dify.thape.com.cn$request_uri;
}
server {
listen 443 ssl;
server_name dify.thape.com.cn;
ssl_certificate /etc/ssl/cert/STAR_thape_com_cn_integrated.crt;
ssl_certificate_key /etc/ssl/private/STAR_thape_com_cn.key;
client_max_body_size 10M;
location / {
proxy_pass http://dify_web_proxy;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
access_log /var/www/dify/shared/log/nginx.access.log;
error_log /var/www/dify/shared/log/nginx.error.log;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
|