try_files php

Marcos Neves marcos.neves at gmail.com
Fri May 28 00:09:07 MSD 2010


Thanks all for helping.

Marcos Neves
+55 44 9918-8488



2010/5/27 Igor Sysoev <igor at sysoev.ru>:
> On Thu, May 27, 2010 at 04:35:56PM -0300, Marcos Neves wrote:
>
>> If we ignore the layout files, using the rewrite solution is a good one?
>
> No. A good solution is:
>
>     location / {
>         try_files  $uri $uri/index.htm $uri.htm $uri.html @php;
>     }
>
>     location @php1 {
>         try_files  $uri.php  =404;
>         fastcgi_pass  ...
>     }
>
>
> --
> Igor Sysoev
> http://sysoev.ru/en/
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx
>



More information about the nginx mailing list