title: ERR_EMPTY_RESPONSE with Ghost 0.7.5, Nginx 1.9, HTTPS and HTTP/2
body: <h1>Problem</h1>
  
  <p>When I hit <code>kevinsuttle.com</code>, I get</p>
  
  <pre><code>"No data received ERR_EMPTY_RESPONSE".
  </code></pre>
  
  <p>When I hit <code>https://kevinsuttle.com</code>, I get the site.    </p>
  
  <p>ghost 0.7.5<br>
  nginx 1.4 => 1.9.9<br>
  letsencrypt 0.2.0   </p>
  
  <p><strong>Digital Ocean</strong>: Ubuntu 14.04 Ghost 1-click droplet  </p>
  
  <p>Under <em>Networking > Domains</em>, I have both <code>kevinsuttle.com</code> and <code>www.kevinsuttle.com</code> as <code>A</code> records pointing to the server's IP address (<code>@</code>).</p>
  
  <p><strong>DNSimple records</strong>  </p>
  
  <pre>
  | Type  | Name                  | TTL               | Content                   |
  |------ |---------------------  |---------------    |------------------------   |
  | URL   | www.kevinsuttle.com   | 3600 (1 hour)     | http://kevinsuttle.com    |  
  </pre>
  
  <p>The only modified portion in Ghost's config.js is my domain.  </p>
  
  <pre><code>url: 'http://kevinsuttle.com',
  </code></pre>
  
  <h2>Nginx 1.9</h2>
  
  <p>nginx 1.9 doesn't create the following directories by default:<br>
  /etc/nginx/sites-available<br>
  /etc/nginx/sites-enabled  </p>
  
  <p>and the usual <code>default</code> conf isn't created in either of those directories.</p>
  
  <p>Instead, there is a <code>etc/nginx/conf.d/default.conf</code> and the important one, <code>etc/nginx/conf.d/nginx.conf</code>. You'll see a lot of tutorials telling you to delete the default.conf, which seems to be fine, but whatever you do, <strong>do NOT delete <code>nginx.conf</code>.</strong></p>
  
  <p>Also, you should move/create your <code>ghost.conf</code> into the <code>/etc/nginx/conf.d/</code> directory. That's what fixed one of my problems, because the last line in <code>etc/nginx/conf.d/nginx.conf</code> looks in the <code>/conf.d/</code> directory an includes any files there: <code>include /etc/nginx/conf.d/*.conf;</code>  </p>
  
  <p>Here's my <code>/etc/nginx/conf.d/ghost.conf</code> file:  </p>
  
  <pre><code>  server {
    root /usr/share/nginx/html;
    index index.html index.htm;
  
    listen 443 ssl http2;
  
    server_name kevinsuttle.com www.kevinsuttle.com;
      ssl_certificate /etc/letsencrypt/live/kevinsuttle.com/fullchain.pem;
      ssl_certificate_key /etc/letsencrypt/live/kevinsuttle.com/privkey.pem;
      ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
      ssl_prefer_server_ciphers on;
      ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
  
    location ~ /.well-known {
        allow all;
        root /var/www/;
    } 
  
    location / {
          proxy_set_header X-Real-IP $remote_addr;
          proxy_set_header HOST $http_host;
          proxy_set_header X-NginX-Proxy true;
  
          proxy_pass http://127.0.0.1:2368;
          proxy_redirect off;
          root /var/www/;
      }
        location /.well-known/ {
          root /var/www/;
      }
  }
  
  server {
      listen 80 ssl http2;
      server_name kevinsuttle.com;
      return 301 https://$host$request_uri;
  }
  </code></pre>
  
  <p>Now, I had this all working fine, and tried to upgrade nginx to 1.9+, in order to serve via http/2. DigitalOcean's 1-click Ghost droplet defaults to using nginx 1.4. </p>
  
  <p>Long story short, I kept getting this error:  </p>
  
  <pre><code>dpkg: error processing archive /var/cache/apt/archives/nginx_1.9.9-1~trusty_amd64.deb (--unpack):
  </code></pre>
  
  <p>and the only solution I found was   </p>
  
  <pre><code>apt-get purge nginx nginx-common
  </code></pre>
  
  <p>I was then able to install nginx 1.9, by adding the following lines to my <strong>/etc/apt/source.list</strong> file.</p>
  
  <pre><code>deb http://nginx.org/packages/mainline/ubuntu/ trusty nginx
  deb-src http://nginx.org/packages/mainline/ubuntu/ trusty nginx
  </code></pre>
  
  <p>Now I simply added <code>listen 80 ssl http2;</code> and <code>listen 443 ssl http2;</code>, and http/2 works fine. But only when the <code>https://</code> URL is explicitly entered. </p>
  
  <p>I found <a href="https://github.com/strongloop/express/issues/2364" rel="nofollow">some evidence</a> that points to the fact that <code>express</code> doesn't support <code>http/2</code>, but I'm not 100% on that. </p>
  
  <p>Any ideas would be much appreciated. </p>