我有一个带有自定义设置的DS415 +,用于在Reddit上按this post后在Docker容器中运行的若干服务的反向代理。在我更新到DSM 6.2.2 Update 3之前,一切工作正常。此后,尽管curl-ing localhost:port或DiskStation_LAN_address:port可以正常工作,但是尝试访问这些服务会导致超时。
我尝试从LetsEncrypt更新证书,一次取出一个选项,通过以下方法清除连接:
proxy_set_header Connection "";
无济于事...
这是我的自定义server.conf文件:
server {
listen 80;
listen [::]:80;
server_name XXXXXXX.XXXXXXXX.XXX;
# Include this if you want to get a letsencrypt certificate for the domain you're using
location ^~ /.well-known/acme-challenge/ {
auth_basic off;
root /var/lib/letsencrypt;
default_type "text/plain";
}
# Include this if you want to automatically redirect to HTTPS
location / {
return 301 https://XXXXXXX.XXXXXXXX.XXX$request_uri;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name XXXXXXX.XXXXXXXX.XXX;
large_client_header_buffers 4 32k;
# Include these if you want to use a specific certificate,
# you'll need to find the location of the letsencrypt after you get it...
# so this might need to be updated afterwards
ssl_certificate /usr/syno/etc/certificate/_archive/XXXXXX/fullchain.pem;
ssl_certificate_key /usr/syno/etc/certificate/_archive/XXXXXX/privkey.pem;
# add_header Strict-Transport-Security "max-age=15768000; includeSubdomains; preload" always;
# Include this if you want basic authentication required
# auth_basic “Restricted”;
# auth_basic_user_file /etc/nginx/.htpasswd;
# Sonarr, requires Sonarr update webhome configuration to match
location /sonarr {
proxy_set_header Host $http_host;
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 $scheme;
proxy_set_header Connection "";
proxy_intercept_errors on;
proxy_http_version 1.1;
proxy_pass http://localhost:8989;
proxy_redirect default;
}
}
有人对诊断为什么发生超时有任何建议,并希望有解决方案吗?正如我所说,这些服务正在运行,并且可以使用NAS地址+端口进行访问,但不能从外部进行访问。 nginx是1.15.7版。提前非常感谢!
我感到很愚蠢...事实证明,无论出于何种原因,路由器上的端口转发规则都已重置。恢复它们后,一切都将正常运行。