title: Nginx, try_files proxy and named location with 404 fallback
body: <p>I have an odd issue which is only affecting one local app I'm working on - other apps with this approach seem to work fine (Ghost). This is from my Nginx server config:</p>
  
  <pre><code>location @node_proxy {
    proxy_set_header        X-Real-IP            $remote_addr;
    proxy_set_header        X-Forwarded-For      $remote_addr;
    proxy_set_header        X-Forwarded-Proto    $scheme;
    proxy_set_header        X-NginX-Proxy        true;
    proxy_set_header        Host                 $host;
    proxy_redirect          off;
    proxy_pass              http://127.0.0.1:5000;
  }
  
  location / {
    try_files @node_proxy =404;
  }
  </code></pre>
  
  <p>As I said, I have Ghost running identically to this and it performs fine. However for this config it results in every request being a 404 - it seems to never hit the proxy. I've checked logs and this confirms my suspicions, no entries in the access or error logs.</p>
  
  <p>The app I'm proxying through to in this instance is just a simple Express based node app, so nothing complex. Visiting <code>http://127.0.0.1:5000</code> I see the expected results.</p>
  
  <p>If I change my config to:</p>
  
  <pre><code>location / {
    proxy_set_header        X-Real-IP            $remote_addr;
    proxy_set_header        X-Forwarded-For      $remote_addr;
    proxy_set_header        X-Forwarded-Proto    $scheme;
    proxy_set_header        X-NginX-Proxy        true;
    proxy_set_header        Host                 $host;
    proxy_redirect          off;
    proxy_pass              http://127.0.0.1:5000;
  }
  </code></pre>
  
  <p>It works as expected, however I'd like to make use of the named location so as to avoid having to repeat proxy declarations.</p>
  
  <p>Have I missed something obvious?</p>