Nginx 1.7.0: location @php

TECK nginx-forum at
Sat May 31 10:31:09 UTC 2014


> I'm guessing that you may want something like
> try_files i-dislike-macro-include @php;
What you posted is some deprecated configuration available on Google.

> Perhaps the request that you made did not match the location blocks that
you showed?
If that would be the case, the proper code posted earlier would not work, so
this is not the case. I'm very familiar with Nginx and I understand the
try_files concept very well. My original question was how to avoid repeating
a segment of configuration code endless times, more exactly this:
	try_files $uri =404;
	fastcgi_split_path_info ^(.+\.php)(/.+)$;
	fastcgi_pass fastcgi;
	fastcgi_param PATH_INFO $fastcgi_path_info;
	fastcgi_param PATH_TRANSLATED $document_root$fastcgi_script_name;
	include fastcgi.conf;

Using logic and the examples provided into Nginx documentation what I posted
previously should work. Can you provide a solution to my question?

Posted at Nginx Forum:,250342,250517#msg-250517

More information about the nginx mailing list