title: NGINX try_files does not pass to PHP
body: <p>I have a very simple PHP site:</p>
  
  <pre><code>.  
  ├── about.php  
  ├── index.php  
  ├── project  
  │   ├── project_one.php  
  │   └── project_two.php  
  └── projects.php  
  </code></pre>
  
  <p>And the following nginx config (only relevant parts shown):</p>
  
  <pre><code>location ~ \.php$ {
      fastcgi_split_path_info ^(.+\.php)(/.+)$;
      fastcgi_pass unix:/path/to/php.sock;
      fastcgi_index index.php;
      include fastcgi_params;
      fastcgi_intercept_errors on;
  }
  
  location / {
      index index.php;
      try_files $uri $uri/ $uri.php =404;
  }
  </code></pre>
  
  <p>Hitting the <code>/</code> works as expected. Hitting any of the <code>http://my.site.com/{projects | about | project/*}</code> URLs should use try_files to hit the <code>$uri.php</code> file, and pass it to PHP. But instead, the browser just downloads the PHP file itself.</p>
  
  <p>I can get it to work by adding individual location directives for the above locations, like so:</p>
  
  <pre><code>location /projects {
      try_files $uri $uri/ /$uri.php;
  }
  location /about {
      try_files $uri $uri/ /$uri.php;
  }
  location /project {
      try_files $uri $uri/ $uri.php;
  }
  </code></pre>
  
  <p>But this is clearly not the way to do this.</p>
  
  <p>What am I doing wrong???</p>