AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-632342

Andreas's questions

Martin Hope
Andreas
Asked: 2021-04-17 03:03:52 +0800 CST

路由器或反向代理 - 网络故障

  • 0

我有一个 edgerouter x sfp 作为互联网的主路由器。到此路由器,服务器与运行称为 swag 的反向代理 docker 连接,例如。我用来从互联网访问 nextcloud 和几个 ngnix docker 的letsencrypt。

这几乎很好用。因此,导航这些站点和 nextcloud 可以工作,但是当我开始下载大文件时,问题就开始了。

当我通过网络浏览器从 nextcloud 下载 20GB 文件时,根据 chrome,它由于“网络故障”而失败。我可以重新启动下载,并且可以在多次重新启动后完成下载(从下载菜单中的 kontext 菜单)。当我从 nginx 站点下载相同的文件时也会发生同样的情况,因此它与 nextcloud 没有直接关系。

但是,当我通过 OpenVPN 连接到我的网络并通过内部 LAN IP 下载文件时,我可以成功下载文件。因此,通过 OpenVPN 使用服务器的直接 IP 不会导致 chrome 中出现“网络故障”消息。

所以有人可以帮我找出问题所在:

  1. 是不是edgerouter x sfp配置错了(我只是加了端口转发位)
  2. 反向代理是问题吗(这里我从 docker 本身获取了建议的代理配置)
  3. 或者是其他东西?

编辑 1:nginx 配置文件:

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name shop.*;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;

    # enable for ldap auth, fill in ldap details in ldap.conf
    #include /config/nginx/ldap.conf;

    location / {
        # enable the next two lines for http auth
        #auth_basic "Username and Password Required";
        #auth_basic_user_file /config/nginx/.htpasswd;

        # enable the next two lines for ldap auth
        #auth_request /auth;
        #error_page 401 =200 /login;

        include /config/nginx/proxy.conf;
        resolver 127.0.0.11 valid=30s;
        set $upstream_grafana nginx;
        proxy_pass http://$upstream_grafana;
    }
}

nextcloud 配置文件:

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name nextcloud.*;
    
    include /config/nginx/ssl.conf;
    
    add_header Strict-Transport-Security "max-age=15552000; includeSubDomains";
            

    location / {
        include /config/nginx/proxy.conf;
        resolver 127.0.0.11 valid=30s;
        set $upstream_nextcloud nextcloud;
        proxy_max_temp_file_size 2048m;
        
        proxy_pass https://$upstream_nextcloud;         
    }
    
    
    location ^~ /.well-known {
        # The following 6 rules are borrowed from `.htaccess`

        location = /.well-known/carddav     { return 301 /remote.php/dav/; }
        location = /.well-known/caldav      { return 301 /remote.php/dav/; }
        # Anything else is dynamically handled by Nextcloud
        location ^~ /.well-known            { return 301 /index.php$uri; }

        try_files $uri $uri/ =404;
    }       
}
troubleshooting reverse-proxy ubiquiti-edgerouter
  • 1 个回答
  • 200 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve