server{
server_name xxx.xxx.com;
location / {
# DSM Server
proxy_pass https://ip:5001;
# header變數,記錄使用者的 IP
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 $http_x_forwarded_proto;
proxy_max_temp_file_size 0;
# Surveillance
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 86400;
}
listen [::]:443 http2 ssl;
listen 443 http2 ssl;
}