Understanding location blocks and try files
nginx-forum at nginx.us
Wed Jan 22 18:31:50 UTC 2014
I'm trying to understand a problem I'm facing in a typical
I've setup a test config with a single simple server , and ran a test
script with debugging enabled to show what happens .
What confuses me is why this example is a 404:
> curl -i http://nginx.dev/apples.json
> HTTP/1.1 404 Not Found
> Server: nginx/1.4.4
As can be seen in the log  there is an invalid response from /index.php.
If I disable the location block adding cache headers for json files 
though, the response is fine.
Can someone shed some light as to why this happens? Is there a way to define
location blocks for static files - without that causing problems for dynamic
requests for the same url pattern?
Any help appreciated,
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,246713,246713#msg-246713
More information about the nginx