我有一个DS415+,带有反向代理的自定义设置,可以在Reddit上的this post之后的Docker容器中运行几个服务。在我更新到DSM6.2.2更新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。首先要感谢大家!
发布于 2019-09-26 03:53:50
我觉得自己好傻..。事实证明,不管是什么原因,我的路由器上的端口转发规则已经重置。一旦我修复了它们,一切都运行得很好。
https://stackoverflow.com/questions/58076648
复制相似问题