title: How to setup nginx configuration?
body: <p>I have been trying to figure out how to point the server to my static page that i store it up somewhere in my cloud server. Also, i am using NodeJs as my backend.</p>
  
  <p>My old problem: It's not point to my myProjectX index.html instead it points to the Nginx default web page "Welcome to Nginx!". I cannot figure out why ;/</p>
  
  <p>Update</p>
  
  <p>My new problem: After this new configuration that i did, it points me to a 404 page instead of pointing to my index.html</p>
  
  <p>Also, in the line 20, it gives me an error of duplicate "/" when i run sudo nginx -t for debugging purpose</p>
  
  <pre><code>`nginx: [emerg] duplicate location "/" in /etc/nginx/sites-enabled/default:20 `
  </code></pre>
  
  <p>here's my Nginx configuration file...</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>server {
      listen 80 default_server;
      listen [::]:80 default_server ipv6only=on;
  
      server_name www.andii90s.com;
  
      root /home/andy/www/myProjectX/app;
      index index.html index.htm;
  
  
      location / {
          proxy_pass http://10.137.10.140:8080;
          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;
      }
  
      location / {
          #Line 20
          try_files $uri $uri/ =404;
      }
  
      error_page 404 /404.html;
      error_page 500 502 503 504 /50x.html;
      location = /50x.html {
         root /home/andy/www/myProjectX/app;
      }
  } </code></pre>
  </div>
  </div>
  </p>