Nginx 1.7.0: location @php

TECK nginx-forum at
Sat May 31 05:59:18 UTC 2014

Hi Francis,

> Answer #1: what does "does not work" mean?
When I process an URI request, it downloads the file instead of executing
the PHP code.

What I try to achieve is very simple, use @php as location to execute PHP
code instead of repeating it over and over in various locations. Here it is
a better example of a functional setup:

What I try to achieve is replace the location ~ \.php$ location contents
with @php ones so I only execute try_files:


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

More information about the nginx mailing list