From c89fce22cef9b5c02df95047cdaf27dee0752bd3 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Mon, 23 Jul 2007 12:35:21 +0000 Subject: [PATCH] fix case when two directives proxy_pass http://backend; proxy_pass https://backend; both use one port - 80 or 443, that was defined first. --- src/http/ngx_http_upstream.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index 376b85fcd..bc4567458 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -3209,6 +3209,12 @@ ngx_http_upstream_add(ngx_conf_t *cf, ngx_url_t *u, ngx_uint_t flags) continue; } + if (uscfp[i]->default_port && u->default_port + && uscfp[i]->default_port != u->default_port) + { + continue; + } + return uscfp[i]; }