title: Redirect to https not working (and https itself not working)
body: <p>My goals are to get https to work, and then get the http to https redirections, and the non-www to www redirections to work.</p>
  
  <p>Nginx.conf looks like:</p>
  
  <pre><code>http {
      include       mime.types;
      default_type  application/octet-stream;
      types_hash_max_size 2048;
      server_names_hash_bucket_size 64;
  
      include site.conf;
  
      server {
          listen       8080;
          server_name  localhost;
  
          #charset koi8-r;
  
          #access_log  logs/host.access.log  main;
  
          location / {
              root   html;
              index  index.html index.htm;
          }
      }
  }
  </code></pre>
  
  <p>site.conf looks like:</p>
  
  <pre><code>upstream site_local {
     server 127.0.0.1:9090 max_fails=3 fail_timeout=20s;
  }
  
  server {
      listen 80;
      server_name site.com;
      return 301 https://www.site.com$request_uri;
  }
  
  server {
      listen 80;
      server_name www.site.com;
      return 301 https://www.site.com$request_uri;
  }
  
  
  server {
      listen 443;
      server_name www.site.com;
      set $app_root /home/site/site-web-node/public;
  
      ssl on;
      ssl_certificate /etc/ssl/SSL.crt;
      ssl_certificate_key /etc/ssl/site.key;
  
      location / {
          proxy_pass https://site_local;
          client_max_body_size    10m;
          client_body_buffer_size 128k;
      }
  
      location ~ /(app|lang|js) {
          root $app_root;
      }
  }
  </code></pre>
  
  <p><code>service nginx reload</code> is successful, however the website's https isn't working, nor the redirects. http is working as before.</p>
  
  <p>nginx -t returns successful.</p>