title: My nginx hosts are not workinig. I was trying to map my frontend and backend server running in localhost to a virtual host
body: <p>I am setting up a virtual host using Nginx in my localhost(I am using Ubuntu 20.04), but when I enter <code>https://www.intervue-dev.io</code> in my browser, output is coming as DNS_PROBE_FINISHED_NXDOMAIN</p>
  <p>My frontend server running on localhost:3000 and my backend server is running on localhost:9000.</p>
  <p>Here is the configuration of /etc/hosts:</p>
  <pre><code>127.0.0.1   intervue-dev.io
  127.0.0.1   www.intervue-dev.io
  </code></pre>
  <p>Here is the configuration of /etc/nginx/nginx.conf:</p>
  <pre><code>#user  nobody;
  worker_processes auto;
  worker_rlimit_nofile 100000;
  events {
      worker_connections  4000;
  }
  http {
      include       mime.types;
      default_type  application/octet-stream;
      proxy_read_timeout 300;
      proxy_connect_timeout 300;
      proxy_send_timeout 300;
      fastcgi_read_timeout 300;
      sendfile        on;
      keepalive_timeout  65;
      server {
          listen       80;
          server_name  localhost;
          error_page   500 502 503 504  /50x.html;
          location = /50x.html {
              root   html;
          }
  server {
    listen 80;
    server_name www.intervue-dev.io intervue-dev.io;
    return 301 https://$server_name$request_uri;
  }
  server {
    listen 443 ssl http2;
    server_name intervue-dev.io;
    return 301 https://www.$server_name$request_uri;
  }
  server {
        listen 443 ssl default_server;
        client_max_body_size 30M;
        ssl_protocols       TLSv1 TLSv1.1 TLSv1.2;
        server_name intervue-dev.io www.intervue-dev.io;
        access_log /var/log/nginx/access.log;
        error_log  /var/log/nginx/error.log info;
        keepalive_timeout 75 75;
        ssl_certificate /etc/nginx/server.crt;
        ssl_certificate_key /etc/nginx/server.key;
        ssl_ciphers HIGH:!aNULL:!MD5;
        ssl_session_timeout  5m;
        add_header Strict-Transport-Security &quot;max-age=7200&quot;;
        location / {
          proxy_pass http://localhost:3000;
          proxy_http_version 1.1;
          proxy_set_header Upgrade $http_upgrade;
          proxy_set_header Connection 'upgrade';
          proxy_set_header Host $host;
          proxy_cache_bypass $http_upgrade;
          proxy_set_header X-Forwarded-Proto https;
        }
        location /test/ {
          return 200 'gangnam style!';
          add_header Content-Type text/plain;
        }
        location /developer/ {
          proxy_pass http://localhost:3004;
          proxy_http_version 1.1;
          proxy_set_header Upgrade $http_upgrade;
          proxy_set_header Connection 'upgrade';
          proxy_set_header Host $host;
          proxy_cache_bypass $http_upgrade;
          proxy_set_header X-Forwarded-Proto https;
        }
        location /bff {
          proxy_pass http://localhost:5000;
          proxy_http_version 1.1;
          proxy_set_header Upgrade $http_upgrade;
          proxy_set_header Connection 'upgrade';
          proxy_set_header Host $host;
          proxy_cache_bypass $http_upgrade;
          proxy_set_header X-Forwarded-Proto https;
        }
        location /socket {
          proxy_pass http://localhost:9000;
          proxy_http_version 1.1;
          proxy_set_header Upgrade $http_upgrade;
          proxy_set_header Connection 'upgrade';
          proxy_set_header Host $host;
          proxy_cache_bypass $http_upgrade;
          proxy_set_header X-Forwarded-Proto https;
        }
        location /whiteboard {
          proxy_pass http://localhost:9000;
          proxy_http_version 1.1;
          proxy_set_header Upgrade $http_upgrade;
          proxy_set_header Connection 'upgrade';
          proxy_set_header Host $host;
          proxy_cache_bypass $http_upgrade;
          proxy_set_header X-Forwarded-Proto https;
        }
        location /languageserver {
          proxy_pass http://localhost:9100;
          proxy_http_version 1.1;
          proxy_set_header Upgrade $http_upgrade;
          proxy_set_header Connection 'upgrade';
          proxy_set_header Host $host;
          proxy_cache_bypass $http_upgrade;
          proxy_set_header X-Forwarded-Proto https;
        }
        location /test-cases {
          proxy_pass http://localhost:7200;
          proxy_http_version 1.1;
          proxy_set_header Upgrade $http_upgrade;
          proxy_set_header Connection 'upgrade';
          proxy_set_header Host $host;
          proxy_cache_bypass $http_upgrade;
          proxy_set_header X-Forwarded-Proto https;
        }
      }
  }
  </code></pre>
  <p>Please help me out.</p>