aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_static_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/modules/ngx_http_static_module.c')
-rw-r--r--src/http/modules/ngx_http_static_module.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/http/modules/ngx_http_static_module.c b/src/http/modules/ngx_http_static_module.c
index a84a70eb6..54e624fa8 100644
--- a/src/http/modules/ngx_http_static_module.c
+++ b/src/http/modules/ngx_http_static_module.c
@@ -210,8 +210,10 @@ ngx_http_static_handler(ngx_http_request_t *r)
rc = NGX_HTTP_INTERNAL_SERVER_ERROR;
}
- ngx_log_error(level, log, err,
- ngx_open_file_n " \"%s\" failed", name.data);
+ if (rc != NGX_HTTP_NOT_FOUND || clcf->log_not_found) {
+ ngx_log_error(level, log, err,
+ ngx_open_file_n " \"%s\" failed", name.data);
+ }
return rc;
}