admin管理员组

文章数量:1129459

we face the issue of an ERR_CONNECTION_REFUSED within Chrome/Edge for local hosted (same subnet) web sites/web apps. Some of the website/apps are behind an NGINX reverse proxy.

Starting a fresh browser session, all resources can be accessed. After a while of using them, the error occurs (pattern to force the issue unknown). This happens then to all sites, no matter if they are behind the proxy or direct connection.

"Solution":

  • keep the browser open and wait for a while -> starts working again.
  • starting an alternative browser while the faulting one is open
  • Close the faulting browser and open it again -> works immediately again.

Observations:

  • Doing Wireshark on the client and the target servers -> I don't see any outgoing/incoming traffic.
  • Using the same client/browser on a different site (site-to-site VPN), the error did not pop up so far (however, less "stress testing" experience)

I suspect the reverse proxy is causing the issue on the browsers; only working with direct connection to sites, never caused the mentioned error so far.

Sample of the server block

server {
    listen                              80;
    listen                              [::]:80;
    index                               index.html index.htm index.php default.html default.htm;
    server_name                         ha.SAMPLE;
    root                                html/ha.SAMPLE;
    access_log                          logs/w3/ha.SAMPLE_access.log;
    error_log                           logs/w3/ha.SAMPLE_error.log;
    include                             error.conf;
    location = /robots.txt {
        add_header                      Content-Type text/plain;
        return 200                      "User-agent: *\nDisallow: /\n";
    }
}
server {
    listen                              443 ssl;
    listen                              [::]:443 ssl;
    server_name                         ha.SAMPLE;
    access_log                          logs/proxy/ha.SAMPLE_access.log;
    error_log                           logs/proxy/ha.SAMPLE_error.log;
    ssl_trusted_certificate             ../ssl/ha.SAMPLE/ha.SAMPLE-chain-only.pem;
    ssl_certificate                     ../ssl/ha.SAMPLE/ha.SAMPLE-chain.pem;
    ssl_certificate_key                 ../ssl/ha.SAMPLE/ha.SAMPLE-key.pem;
    
    location = /robots.txt {
        add_header                      Content-Type text/plain;
        return 200                      "User-agent: *\nDisallow: /\n";
    }
        
    location / {
        proxy_pass                      http://IPADDRESS;
        proxy_set_header                Host $host;
        proxy_set_header                X-Real-IP $remote_addr;
        proxy_set_header                Upgrade $http_upgrade;
        proxy_set_header                Connection "Upgrade";
        proxy_http_version              1.1;
    }
}

nginx.conf

worker_processes                    1;
events {
    worker_connections              1024;
}
http {
    server_names_hash_bucket_size   256;
    include                         mime.types;
    default_type                    application/octet-stream;
    include                         serverblocks/*.conf;
    server_tokens                   off;
    keepalive_timeout               75;
}

Does anyone have some idea where to look at? Thanks for your support!

本文标签: windowsERRCONNECTIONREFUSED EdgeChromeStack Overflow