Nginx 1.7.0: location @php

TECK nginx-forum at nginx.us
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:
http://pastie.org/private/5gkl1pti1co0onzhgb8jpg

What I try to achieve is replace the location ~ \.php$ location contents
with @php ones so I only execute try_files:
http://pastie.org/private/iuz58naozk6xo92ukqmwsg

Regards,

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,250342,250514#msg-250514



More information about the nginx mailing list