

![]() | 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: |
31 messages in ru.sysoev.nginxRe: error_page and named locations| From | Sent On | Attachments |
|---|---|---|
| cynix | Dec 10, 2008 6:32 am | |
| cynix | Dec 10, 2008 7:51 am | |
| Igor Sysoev | Dec 10, 2008 8:11 am | .fastcgi |
| Almir Karic | Dec 10, 2008 8:28 am | |
| Igor Sysoev | Dec 10, 2008 8:49 am | |
| cynix | Dec 11, 2008 2:09 am | |
| Igor Sysoev | Dec 11, 2008 2:51 am | |
| Igor Sysoev | Dec 11, 2008 3:09 am | |
| Phillip B Oldham | Dec 11, 2008 3:47 am | |
| Igor Sysoev | Dec 11, 2008 4:31 am | |
| cynix | Dec 11, 2008 4:39 am | |
| Jean-Philippe Moal | Dec 11, 2008 5:55 am | |
| Jim Ohlstein | Dec 11, 2008 6:07 am | |
| Igor Sysoev | Dec 11, 2008 6:18 am | |
| Igor Sysoev | Dec 11, 2008 8:09 am | |
| Ezra Zygmuntowicz | Dec 11, 2008 8:34 am | |
| mike | Dec 11, 2008 10:51 am | |
| Igor Sysoev | Dec 11, 2008 11:55 am | |
| Jean-Philippe Moal | Dec 11, 2008 12:44 pm | |
| mike | Dec 11, 2008 2:18 pm | |
| Igor Sysoev | Dec 12, 2008 12:13 am | |
| mike | Dec 12, 2008 12:54 am | |
| Igor Clark | Dec 12, 2008 1:49 am | |
| Igor Sysoev | Dec 12, 2008 3:12 am | |
| Igor Clark | Dec 12, 2008 7:05 am | |
| Igor Sysoev | Dec 12, 2008 7:31 am | |
| Mark Alan | Dec 12, 2008 8:22 am | |
| Ezra Zygmuntowicz | Dec 12, 2008 9:00 am | |
| KT Walrus | Dec 12, 2008 2:01 pm | |
| Igor Clark | Dec 12, 2008 2:06 pm | |
| Merlin | Jan 2, 2009 11:08 pm |

![]() | 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: error_page and named locations | Actions... |
|---|---|---|
| From: | Igor Sysoev (is...@rambler-co.ru) | |
| Date: | Dec 11, 2008 6:18:28 am | |
| List: | ru.sysoev.nginx | |
On Thu, Dec 11, 2008 at 02:56:16PM +0100, Jean-Philippe Moal wrote:
Igor Sysoev a ??crit :
I'm going to implement the non_existant_request_file directive to use in similar configurations:
location ~\.php$ { non_existant_request_file @drupal;
fastcgi_pass .. }
This directive test a request file existance before passing a request to fastcgi/proxy.
Could someone suggest better name ?
Also I want to replace typcal mongrel configuration:
with something like
location / { match $request_filename $request_filename/index.html $request_filename.html; @mongrel; }
like "index" directive.
Or
try $request_filename $request_filename/index.html $request_filename.html /some_fallback_url;
The single directive can be used for Mongrel type configuration:
location / { file_match $uri $uri/index.html $uri.html @mongrel; }
location @mongrel { ... }
and Drupal/Joomla type configuration:
location / { file_match $uri @drupal; # the same as # error_page 404 = @drupal; log_not_found off; }
location ~ \.php$ { file_match $uri @drupal;
fastcgi_pass ... fastcgi_param SCRIPT_FILENAME /path/to$script_filename; }
location @drupal { fastcgi_pass ... fastcgi_param SCRIPT_FILENAME /path/to/index.php; }
The file_match iterates parameters and changes URI to the first one that matches filesystem. An @name matches always and is used as fallback. All matches except fallback are handled in the same location context.
I think "try" is a good name for this feature (which will certainly be _really_ useful, thanks !).
How about "try_file $uri $uri/index.html ..." or "test_file $uri ..." ?
-- Igor Sysoev http://sysoev.ru/en/








.fastcgi