

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
15 messages in ru.sysoev.nginxRe: nginx-0.7.31| From | Sent On | Attachments |
|---|---|---|
| Igor Sysoev | Jan 19, 2009 6:05 am | |
| Kevin Worthington | Jan 19, 2009 7:10 am | |
| cynix | Jan 19, 2009 8:47 am | |
| Igor Sysoev | Jan 19, 2009 9:44 am | |
| cynix | Jan 19, 2009 6:32 pm | |
| Igor Sysoev | Jan 19, 2009 11:45 pm | |
| mike | Jan 20, 2009 1:09 am | |
| Igor Sysoev | Jan 20, 2009 1:17 am | |
| mike | Jan 20, 2009 1:40 am | |
| Igor Sysoev | Jan 20, 2009 2:14 am | |
| Igor Sysoev | Jan 20, 2009 3:14 am | |
| Juan Fco. Giordana | Jan 20, 2009 4:22 am | |
| Igor Sysoev | Jan 20, 2009 4:59 am | |
| cynix | Jan 20, 2009 5:47 am | |
| Igor Sysoev | Jan 20, 2009 6:37 am | .dir |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: nginx-0.7.31 | Actions... |
|---|---|---|
| From: | Igor Sysoev (is...@rambler-co.ru) | |
| Date: | Jan 19, 2009 9:44:25 am | |
| List: | ru.sysoev.nginx | |
On Mon, Jan 19, 2009 at 04:47:33PM +0000, cynix wrote:
Igor Sysoev <is@...> writes:
Changes with nginx 0.7.31 19 Jan 2009
*) Change: now the "try_files" directive tests files only and ignores directories.
This seems to cause problems with index.php inside directories. For example:
index index.php; location / { try_files $uri @php; } location @php { fastcgi_pass ...; fastcgi_param SCRIPT_FILENAME $document_root/index.php; } location ~ \.php$ { fastcgi_pass ...; fastcgi_param SCRIPT_FILENAME $document_root$uri; }
With 0.7.30 if you request http://example.com/test/ , $document_root/test/index.php is served. However with 0.7.31, $document_root/index.php is served.
And if you do this:
try_files $uri $uri/index.php @php;
then nginx will serve index.php as a static file, without passing it to FastCGI. I know this is the intended behavior, as internal rewrite is only issued for the last parameter of try_files. So how should we let try_files detect index.php inside a directory if directories are ignored?
The change has been apperaed due to Mongrel-type configuration:
location / { try_files /system/maintenance.html $uri $uri/index.html $uri.html @mongrel; }
location @mogrel { proxy_pass http://mongrel; }
when "/" exists, but /index.html is not exist, then request was handled locally and return 403.
I will look how to resolve the issue.
One possible solution:
location / { try_files $uri @php; }
location @php { fastcgi_pass ...; fastcgi_param SCRIPT_FILENAME $document_root/index.php; }
location ~ (/|\.php)$ { fastcgi_pass ...; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; }
-- Igor Sysoev http://sysoev.ru/en/








.dir