summaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_scgi_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/modules/ngx_http_scgi_module.c')
-rw-r--r--src/http/modules/ngx_http_scgi_module.c30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/http/modules/ngx_http_scgi_module.c b/src/http/modules/ngx_http_scgi_module.c
index 0be5066ec..313f3b3ad 100644
--- a/src/http/modules/ngx_http_scgi_module.c
+++ b/src/http/modules/ngx_http_scgi_module.c
@@ -299,6 +299,20 @@ static ngx_command_t ngx_http_scgi_commands[] = {
offsetof(ngx_http_scgi_loc_conf_t, upstream.next_upstream),
&ngx_http_scgi_next_upstream_masks },
+ { ngx_string("scgi_next_upstream_tries"),
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
+ ngx_conf_set_num_slot,
+ NGX_HTTP_LOC_CONF_OFFSET,
+ offsetof(ngx_http_scgi_loc_conf_t, upstream.next_upstream_tries),
+ NULL },
+
+ { ngx_string("scgi_next_upstream_timeout"),
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
+ ngx_conf_set_msec_slot,
+ NGX_HTTP_LOC_CONF_OFFSET,
+ offsetof(ngx_http_scgi_loc_conf_t, upstream.next_upstream_timeout),
+ NULL },
+
{ ngx_string("scgi_param"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE23,
ngx_http_upstream_param_set_slot,
@@ -1074,6 +1088,7 @@ ngx_http_scgi_create_loc_conf(ngx_conf_t *cf)
conf->upstream.store = NGX_CONF_UNSET;
conf->upstream.store_access = NGX_CONF_UNSET_UINT;
+ conf->upstream.next_upstream_tries = NGX_CONF_UNSET_UINT;
conf->upstream.buffering = NGX_CONF_UNSET;
conf->upstream.ignore_client_abort = NGX_CONF_UNSET;
@@ -1082,6 +1097,7 @@ ngx_http_scgi_create_loc_conf(ngx_conf_t *cf)
conf->upstream.connect_timeout = NGX_CONF_UNSET_MSEC;
conf->upstream.send_timeout = NGX_CONF_UNSET_MSEC;
conf->upstream.read_timeout = NGX_CONF_UNSET_MSEC;
+ conf->upstream.next_upstream_timeout = NGX_CONF_UNSET_MSEC;
conf->upstream.send_lowat = NGX_CONF_UNSET_SIZE;
conf->upstream.buffer_size = NGX_CONF_UNSET_SIZE;
@@ -1142,6 +1158,9 @@ ngx_http_scgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
ngx_conf_merge_uint_value(conf->upstream.store_access,
prev->upstream.store_access, 0600);
+ ngx_conf_merge_uint_value(conf->upstream.next_upstream_tries,
+ prev->upstream.next_upstream_tries, 0);
+
ngx_conf_merge_value(conf->upstream.buffering,
prev->upstream.buffering, 1);
@@ -1160,6 +1179,9 @@ ngx_http_scgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
ngx_conf_merge_msec_value(conf->upstream.read_timeout,
prev->upstream.read_timeout, 60000);
+ ngx_conf_merge_msec_value(conf->upstream.next_upstream_timeout,
+ prev->upstream.next_upstream_timeout, 0);
+
ngx_conf_merge_size_value(conf->upstream.send_lowat,
prev->upstream.send_lowat, 0);
@@ -1248,7 +1270,8 @@ ngx_http_scgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
}
if (conf->upstream.max_temp_file_size != 0
- && conf->upstream.max_temp_file_size < size) {
+ && conf->upstream.max_temp_file_size < size)
+ {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
"\"scgi_max_temp_file_size\" must be equal to zero to disable "
"temporary files usage or must be equal to or greater than "
@@ -1336,6 +1359,11 @@ ngx_http_scgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
conf->cache_key = prev->cache_key;
}
+ if (conf->upstream.cache && conf->cache_key.value.data == NULL) {
+ ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
+ "no \"scgi_cache_key\" for \"scgi_cache\"");
+ }
+
ngx_conf_merge_value(conf->upstream.cache_lock,
prev->upstream.cache_lock, 0);