更新到 DSM 6.2.2 Update 3 后,Synology DSM 上的 Nginx 反向代理停止工作
Nginx reverse proxy on Synology DSM stopped working after update to DSM 6.2.2 Update 3
我有一个 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。非常感谢!
我觉得自己很蠢...结果是,无论出于何种原因,我路由器上的端口转发规则已重置。恢复后,一切正常。
我有一个 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。非常感谢!
我觉得自己很蠢...结果是,无论出于何种原因,我路由器上的端口转发规则已重置。恢复后,一切正常。