title: NGINX + Letsencrypt + node.js configuration
body: <p>I'm trying to convert my site to use https. I'm running a Digital ocean VPS droplet running ubuntu 14.04.</p>
  
  <p>My site is currently stored in /root.
  The working NGINX reverse-proxy http server block that successfully served my site is bellow:</p>
  
  <pre><code>server {
      listen 80;
      listen [::]:80;
  
      server_name mysite.com www.mysite.com;
  
      location / {
          proxy_pass http://localhost: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;
      }
  }
  </code></pre>
  
  <p>I followed the instructions from a digital ocean tutorial that uses LetsEncrypt to switch to https: <a href="https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-14-04" rel="nofollow noreferrer">https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-14-04</a></p>
  
  <p><strong>HTTPS works with this current NGINX server block --HOWEVER-- it appears to only serve the default nginx index.html welcome page found in /usr/share/nginx/html rather than serving my site.</strong> </p>
  
  <pre><code>server {
      listen 80;
      server_name mysite.com www.mysite.com
  
      location / {
          proxy_pass http://localhost: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;
      }
      return 301 https://$host$request_uri;
  }
  
  server {
      listen 443 ssl;
  
      server_name mysite.com www.mysite.com
  
      ssl_certificate /etc/letsencrypt/live/mysite.com/fullchain.pem;
      ssl_certificate_key /etc/letsencrypt/live/mysite.com/privkey.pem;
      ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
      ssl_prefer_server_ciphers on;
      ssl_dhparam /etc/ssl/certs/dhparam.pem;
      ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
      ssl_session_timeout 1d;
      ssl_stapling on;
      ssl_session_cache shared:SSL:50m;
      ssl_stapling_verify on;
      add_header Strict-Transport-Security max-age=15768000;
  
      location ~ /.well-know {
          allow all;
      }   
  }
  </code></pre>
  
  <p>what could be causing this??</p>