diff options
author | Igor Sysoev <igor@sysoev.ru> | 2008-12-15 10:56:48 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2008-12-15 10:56:48 +0000 |
commit | d8e3d0b5a5c9ca5e92d0a86244a812681a9af751 (patch) | |
tree | 7fd7509960ce6c7e08b873c264a7e56c3cc4a94e /src/http/ngx_http.c | |
parent | 2194e75bb326a266e21f93cf159595a45661f91b (diff) | |
download | nginx-d8e3d0b5a5c9ca5e92d0a86244a812681a9af751.tar.gz nginx-d8e3d0b5a5c9ca5e92d0a86244a812681a9af751.zip |
try_files
Diffstat (limited to 'src/http/ngx_http.c')
-rw-r--r-- | src/http/ngx_http.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c index 3d8915767..615788811 100644 --- a/src/http/ngx_http.c +++ b/src/http/ngx_http.c @@ -489,7 +489,7 @@ ngx_http_init_phase_handlers(ngx_conf_t *cf, ngx_http_core_main_conf_t *cmcf) use_rewrite = cmcf->phases[NGX_HTTP_REWRITE_PHASE].handlers.nelts ? 1 : 0; use_access = cmcf->phases[NGX_HTTP_ACCESS_PHASE].handlers.nelts ? 1 : 0; - n = use_rewrite + use_access + 1; /* find config phase */ + n = use_rewrite + use_access + cmcf->try_files + 1 /* find config phase */; for (i = 0; i < NGX_HTTP_LOG_PHASE; i++) { n += cmcf->phases[i].handlers.nelts; @@ -558,6 +558,15 @@ ngx_http_init_phase_handlers(ngx_conf_t *cf, ngx_http_core_main_conf_t *cmcf) continue; + case NGX_HTTP_TRY_FILES_PHASE: + if (cmcf->try_files) { + ph->checker = ngx_http_core_try_files_phase; + n++; + ph++; + } + + continue; + case NGX_HTTP_CONTENT_PHASE: checker = ngx_http_core_content_phase; break; |