aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/ngx_http.c')
-rw-r--r--src/http/ngx_http.c11
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;