title: NGINX - This site can't be reached
body: <p>Recently my nginx.conf files became corrupted on a couple of CentOS web servers. I put them back together based on development versions I have, but am running into an issue where I get a "This site can't be reached." message whenever I access the site through the clustered URL or via HTTPS. It works fine when I access using the machines' network names directly, though.</p>
  
  <p><a href="https://i.stack.imgur.com/Hjsln.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Hjsln.png" alt="enter image description here"></a></p>
  
  <p>Here is a sanitized version of my nginx.conf file...is anything jumping out here that I might be missing?</p>
  
  <pre><code># For more information on configuration, see:
  #   * Official English Documentation: http://nginx.org/en/docs/
  #   * Official Russian Documentation: http://nginx.org/ru/docs/
  
  user nginx;
  worker_processes auto;
  error_log /var/log/nginx/error.log debug;
  pid /run/nginx.pid;
  
  # Load dynamic modules. See /usr/share/nginx/README.dynamic.
  # include /usr/share/nginx/modules/*.conf;
  
  events {
      worker_connections 1024;
  }
  
  http {
      log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                        '$status $body_bytes_sent "$http_referer" '
                        '"$http_user_agent" "$http_x_forwarded_for" "$ssl_client_s_dn" "$ssl_client_i_dn"';
  
      access_log  /var/log/nginx/access.log  main;
  
      sendfile            off;
      tcp_nopush          on;
      tcp_nodelay         on;
      keepalive_timeout   65;
      types_hash_max_size 2048;
  
      include             /etc/nginx/mime.types;
      default_type        application/octet-stream;
  
      # Load modular configuration files from the /etc/nginx/conf.d directory.
      # See http://nginx.org/en/docs/ngx_core_module.html#include
      # for more information.
      include /etc/nginx/conf.d/*.conf;
  
      server {
          listen 80 default_server;
          listen [::]:80 default_server;
          location /DemoSite/signalr/Latest/ {
              rewrite ^/DemoSite/Latest(.*)$ $1 break;
              proxy_pass http://localhost:5000;
              proxy_http_version 1.1;
              proxy_set_header Upgrade $http_upgrade;
              proxy_set_header Connection "upgrade";
              proxy_read_timeout 86400;
              proxy_set_header Host $http_host;
              proxy_cache_bypass $http_upgrade;
              proxy_set_header X-Real-IP $remote_addr;
              proxy_set_header X-Real-Path $request_uri;
              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
              proxy_set_header X-Forwarded-Host $http_host;
              proxy_set_header X-Forwarded-Server $host;
              proxy_set_header X-Forwarded-Proto $scheme;
              proxy_set_header X-Forwarded-Path $uri;
          }
          location = /DemoSite/Latest {
             return 302 /DemoSite/Latest/;
          }
          location /DemoSite/Latest/ {
              root /var/www/DemoSite/Latest/wwwroot;
              if ($query_string ~ "^([^&amp;]*)_dc=([^&amp;]*)$") {
                rewrite ^(.*)$ $uri?;
              }
              try_files $uri @proxy_latest;
          }
          location @proxy_latest {
              rewrite ^/DemoSite/Latest(.*)$ $1 break;
              proxy_pass http://localhost:5000;
              proxy_http_version 1.1;
              proxy_set_header Upgrade $http_upgrade;
              proxy_set_header Connection keep-alive;
              proxy_set_header Host $http_host;
              proxy_cache_bypass $http_upgrade;
              proxy_set_header X-Real-IP $remote_addr;
              proxy_set_header X-Real-Path $request_uri;
              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
              proxy_set_header X-Forwarded-Host $http_host;
              proxy_set_header X-Forwarded-Server $host;
              proxy_set_header X-Forwarded-Proto $scheme;
              proxy_set_header X-Forwarded-Path $uri;
          }
  
          location /DemoSite/signalr/1.0.0.0/ {
              rewrite ^/DemoSite/1.0.0.0(.*)$ $1 break;
              proxy_pass http://localhost:5001;
              proxy_http_version 1.1;
              proxy_set_header Upgrade $http_upgrade;
              proxy_set_header Connection "upgrade";
              proxy_read_timeout 86400;
              proxy_set_header Host $http_host;
              proxy_cache_bypass $http_upgrade;
              proxy_set_header X-Real-IP $remote_addr;
              proxy_set_header X-Real-Path $request_uri;
              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
              proxy_set_header X-Forwarded-Host $http_host;
              proxy_set_header X-Forwarded-Server $host;
              proxy_set_header X-Forwarded-Proto $scheme;
              proxy_set_header X-Forwarded-Path $uri;
          }
          location = /DemoSite/1.0.0.0 {
             return 302 /DemoSite/1.0.0.0/;
          }
          location /DemoSite/1.0.0.0/ {
              root /var/www/DemoSite/1.0.0.0/wwwroot;
              if ($query_string ~ "^([^&amp;]*)_dc=([^&amp;]*)$") {
                rewrite ^(.*)$ $uri?;
              }
              try_files $uri @proxy_1_0_0_0;
          }
          location @proxy_1_0_0_0 {
              rewrite ^/DemoSite/1.0.0.0(.*)$ $1 break;
              proxy_pass http://localhost:5001;
              proxy_http_version 1.1;
              proxy_set_header Upgrade $http_upgrade;
              proxy_set_header Connection keep-alive;
              proxy_set_header Host $http_host;
              proxy_cache_bypass $http_upgrade;
              proxy_set_header X-Real-IP $remote_addr;
              proxy_set_header X-Real-Path $request_uri;
              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
              proxy_set_header X-Forwarded-Host $http_host;
              proxy_set_header X-Forwarded-Server $host;
              proxy_set_header X-Forwarded-Proto $scheme;
              proxy_set_header X-Forwarded-Path $uri;
          }
  
          location /DemoSite/signalr/3.0.2.0/ {
              rewrite ^/DemoSite/3.0.2.0(.*)$ $1 break;
              proxy_pass http://localhost:5002;
              proxy_http_version 1.1;
              proxy_set_header Upgrade $http_upgrade;
              proxy_set_header Connection "upgrade";
              proxy_read_timeout 86400;
              proxy_set_header Host $http_host;
              proxy_cache_bypass $http_upgrade;
              proxy_set_header X-Real-IP $remote_addr;
              proxy_set_header X-Real-Path $request_uri;
              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
              proxy_set_header X-Forwarded-Host $http_host;
              proxy_set_header X-Forwarded-Server $host;
              proxy_set_header X-Forwarded-Proto $scheme;
              proxy_set_header X-Forwarded-Path $uri;
          }
          location = /DemoSite/3.0.2.0 {
             return 302 /DemoSite/3.0.2.0/;
          }
          location /DemoSite/3.0.2.0/ {
              root /var/www/DemoSite/3.0.2.0/wwwroot;
              if ($query_string ~ "^([^&amp;]*)_dc=([^&amp;]*)$") {
                rewrite ^(.*)$ $uri?;
              }
              try_files $uri @proxy_3_0_2_0;
          }
          location @proxy_3_0_2_0 {
              rewrite ^/DemoSite/3.0.2.0(.*)$ $1 break;
              proxy_pass http://localhost:5002;
              proxy_http_version 1.1;
              proxy_set_header Upgrade $http_upgrade;
              proxy_set_header Connection keep-alive;
              proxy_set_header Host $http_host;
              proxy_cache_bypass $http_upgrade;
              proxy_set_header X-Real-IP $remote_addr;
              proxy_set_header X-Real-Path $request_uri;
              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
              proxy_set_header X-Forwarded-Host $http_host;
              proxy_set_header X-Forwarded-Server $host;
              proxy_set_header X-Forwarded-Proto $scheme;
              proxy_set_header X-Forwarded-Path $uri;
          }
      }
  
      server {
          listen 433 ssl http2 default_server;
          location /DemoSite/Latest/signalr/ {
              rewrite ^/DemoSite/Latest(.*)$ $1 break;
              proxy_pass http://localhost:5000;
              proxy_http_version 1.1;
              proxy_set_header Upgrade $http_upgrade;
              proxy_set_header Connection "upgrade";
              proxy_read_timeout 86400;
              proxy_set_header Host $http_host;
              proxy_cache_bypass $http_upgrade;
          proxy_set_header X-CERT-Subject $ssl_client_s_dn; 
          proxy_set_header X-CERT-Issuer $ssl_client_i_dn; 
              proxy_set_header X-Real-IP $remote_addr;
              proxy_set_header X-Real-Path $request_uri;
              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
              proxy_set_header X-Forwarded-Host $http_host;
              proxy_set_header X-Forwarded-Server $host;
              proxy_set_header X-Forwarded-Proto $scheme;
              proxy_set_header X-Forwarded-Path $uri;
          }
          location = /DemoSite/Latest {
             return 302 /DemoSite/Latest/;
          }
          location /DemoSite/Latest/ {
              root /var/www/DemoSite/Latest/wwwroot;
              if ($query_string ~ "^([^&amp;]*)_dc=([^&amp;]*)$") {
                rewrite ^(.*)$ $uri?;
              }
              try_files $uri @proxy_latest;
          }
          location @proxy_latest {
              rewrite ^/DemoSite/Latest(.*)$ $1 break;
              proxy_pass http://localhost:5000;
              proxy_http_version 1.1;
              proxy_set_header Upgrade $http_upgrade;
              proxy_set_header Connection keep-alive;
              proxy_set_header Host $http_host;
              proxy_cache_bypass $http_upgrade;
          proxy_set_header X-CERT-Subject $ssl_client_s_dn; 
          proxy_set_header X-CERT-Issuer $ssl_client_i_dn; 
              proxy_set_header X-Real-IP $remote_addr;
              proxy_set_header X-Real-Path $request_uri;
              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
              proxy_set_header X-Forwarded-Host $http_host;
              proxy_set_header X-Forwarded-Server $host;
              proxy_set_header X-Forwarded-Proto $scheme;
              proxy_set_header X-Forwarded-Path $uri;
          }
  
          location /DemoSite/1.0.0.0/signalr/ {
              rewrite ^/DemoSite/1.0.0.0(.*)$ $1 break;
              proxy_pass http://localhost:5001;
              proxy_http_version 1.1;
              proxy_set_header Upgrade $http_upgrade;
              proxy_set_header Connection "upgrade";
              proxy_read_timeout 86400;
              proxy_set_header Host $http_host;
              proxy_cache_bypass $http_upgrade;
          proxy_set_header X-CERT-Subject $ssl_client_s_dn; 
          proxy_set_header X-CERT-Issuer $ssl_client_i_dn; 
              proxy_set_header X-Real-IP $remote_addr;
              proxy_set_header X-Real-Path $request_uri;
              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
              proxy_set_header X-Forwarded-Host $http_host;
              proxy_set_header X-Forwarded-Server $host;
              proxy_set_header X-Forwarded-Proto $scheme;
              proxy_set_header X-Forwarded-Path $uri;
          }
          location = /DemoSite/1.0.0.0 {
             return 302 /DemoSite/1.0.0.0/;
          }
          location /DemoSite/1.0.0.0/ {
              root /var/www/DemoSite/1.0.0.0/wwwroot;
              if ($query_string ~ "^([^&amp;]*)_dc=([^&amp;]*)$") {
                rewrite ^(.*)$ $uri?;
              }
              try_files $uri @proxy_1_0_0_0;
          }
          location @proxy_1_0_0_0 {
              rewrite ^/DemoSite/1.0.0.0(.*)$ $1 break;
              proxy_pass http://localhost:5001;
              proxy_http_version 1.1;
              proxy_set_header Upgrade $http_upgrade;
              proxy_set_header Connection keep-alive;
              proxy_set_header Host $http_host;
              proxy_cache_bypass $http_upgrade;
          proxy_set_header X-CERT-Subject $ssl_client_s_dn; 
          proxy_set_header X-CERT-Issuer $ssl_client_i_dn; 
              proxy_set_header X-Real-IP $remote_addr;
              proxy_set_header X-Real-Path $request_uri;
              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
              proxy_set_header X-Forwarded-Host $http_host;
              proxy_set_header X-Forwarded-Server $host;
              proxy_set_header X-Forwarded-Proto $scheme;
              proxy_set_header X-Forwarded-Path $uri;
          }
  
          location /DemoSite/3.0.2.0/signalr/ {
              rewrite ^/DemoSite/3.0.2.0(.*)$ $1 break;
              proxy_pass http://localhost:5002;
              proxy_http_version 1.1;
              proxy_set_header Upgrade $http_upgrade;
              proxy_set_header Connection "upgrade";
              proxy_read_timeout 86400;
              proxy_set_header Host $http_host;
              proxy_cache_bypass $http_upgrade;
          proxy_set_header X-CERT-Subject $ssl_client_s_dn; 
          proxy_set_header X-CERT-Issuer $ssl_client_i_dn; 
              proxy_set_header X-Real-IP $remote_addr;
              proxy_set_header X-Real-Path $request_uri;
              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
              proxy_set_header X-Forwarded-Host $http_host;
              proxy_set_header X-Forwarded-Server $host;
              proxy_set_header X-Forwarded-Proto $scheme;
              proxy_set_header X-Forwarded-Path $uri;
          }
          location = /DemoSite/3.0.2.0 {
             return 302 /DemoSite/3.0.2.0/;
          }
          location /DemoSite/3.0.2.0/ {
              root /var/www/DemoSite/3.0.2.0/wwwroot;
              if ($query_string ~ "^([^&amp;]*)_dc=([^&amp;]*)$") {
                rewrite ^(.*)$ $uri?;
              }
              try_files $uri @proxy_3_0_2_0;
          }
          location @proxy_3_0_2_0 {
              rewrite ^/DemoSite/3.0.2.0(.*)$ $1 break;
              proxy_pass http://localhost:5002;
              proxy_http_version 1.1;
              proxy_set_header Upgrade $http_upgrade;
              proxy_set_header Connection keep-alive;
              proxy_set_header Host $http_host;
              proxy_cache_bypass $http_upgrade;
          proxy_set_header X-CERT-Subject $ssl_client_s_dn; 
          proxy_set_header X-CERT-Issuer $ssl_client_i_dn; 
              proxy_set_header X-Real-IP $remote_addr;
              proxy_set_header X-Real-Path $request_uri;
              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
              proxy_set_header X-Forwarded-Host $http_host;
              proxy_set_header X-Forwarded-Server $host;
              proxy_set_header X-Forwarded-Proto $scheme;
              proxy_set_header X-Forwarded-Path $uri;
          }
  
  
          ssl on;
          ssl_certificate "/etc/ssl/sewrver_certificate.cer";
          ssl_certificate_key "/etc/ssl/server_certificate.key";
          ssl_verify_client optional_no_ca;
      }
  }
  </code></pre>