首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Synology DSM上的Nginx反向代理在更新到DSM 6.2.2更新3后停止工作

Synology DSM上的Nginx反向代理在更新到DSM 6.2.2更新3后停止工作
EN

Stack Overflow用户
提问于 2019-09-24 17:00:37
回答 1查看 1.1K关注 0票数 0

我有一个DS415+,带有反向代理的自定义设置,可以在Reddit上的this post之后的Docker容器中运行几个服务。在我更新到DSM6.2.2更新3之前,一切都运行得很好。从那时起,尝试访问这些服务会导致超时,尽管curl-ing localhost:port或DiskStation_LAN_address:port运行良好。

我尝试从LetsEncrypt续订证书,一次删除一个选项,通过以下方式清除连接:

代码语言:javascript
运行
复制
proxy_set_header        Connection          "";

什么都不管用。

这是我的自定义server.conf文件:

代码语言:javascript
运行
复制
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。首先要感谢大家!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-09-26 03:53:50

我觉得自己好傻..。事实证明,不管是什么原因,我的路由器上的端口转发规则已经重置。一旦我修复了它们,一切都运行得很好。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/58076648

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档