aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_upstream.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2008-12-23 19:35:12 +0000
committerIgor Sysoev <igor@sysoev.ru>2008-12-23 19:35:12 +0000
commit302cedceb0f6647e3c7578f5210c458e9efc90b4 (patch)
tree2b4b8ee78a866e543411e9be5e71cbce16344c8f /src/http/ngx_http_upstream.c
parent8eb5ed2e77c871658e5d204865cc5bfd0f457638 (diff)
downloadnginx-302cedceb0f6647e3c7578f5210c458e9efc90b4.tar.gz
nginx-302cedceb0f6647e3c7578f5210c458e9efc90b4.zip
variable support for unix sockets in fastcgi_pass and proxy_pass
Diffstat (limited to 'src/http/ngx_http_upstream.c')
-rw-r--r--src/http/ngx_http_upstream.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index 9a96a1e3c..f567a438e 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -414,6 +414,20 @@ ngx_http_upstream_init(ngx_http_request_t *r)
} else {
+ if (u->resolved->sockaddr) {
+
+ if (ngx_http_upstream_create_round_robin_peer(r, u->resolved)
+ != NGX_OK)
+ {
+ ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
+ return;
+ }
+
+ ngx_http_upstream_connect(r, u);
+
+ return;
+ }
+
host = &u->resolved->host;
umcf = ngx_http_get_module_main_conf(r, ngx_http_upstream_module);