title: Nginx proxy_next_upstream doesn't work
body: <p>I want nginx to search my local host for the file first and on a 404 error it should search server 1.1.1.1.</p>
  
  <p>I am able to fetch the file that is located on local host, but not able to get from server 1.1.1.1.</p>
  
  <pre><code>server {
      listen 80;
      server_name  localhost;
  
      access_log /var/log/nginx/access.log main;
  
      location /products/ {
          proxy_next_upstream http_404;
  
          root /var/foo;
      }
  }
  
  server {
      listen 80;
      server_name  1.1.1.1;
      location /products/ {
          #########
      }
  }
  </code></pre>
  
  <p>I guess proxy_next_upstream is not switching to the server.</p>
  
  <p>Any help on this would be appreciated.</p>