Proxy_bind doesn't work outside location

Hi

I don’t know if this is appropriate place or not but there is a bug with
proxy_bind, the directive has to be inside a location to work. I’m sure
this wasn’t true for early versions.
so this won’t work:
proxy_bind 1.7.2.109;
location /test {
.
.
.
proxy_pass …;
}

while this does

    location /test {
    .
    .
    .
    proxy_bind 1.7.2.109;
    proxy_pass ...;
   }

nginx version: nginx/1.1.8
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx
–conf-path=/etc/nginx/nginx.conf
–error-log-path=/var/log/nginx/error.log --http-client-body-temp
-path=/var/lib/nginx/body
–http-fastcgi-temp-path=/var/lib/nginx/fastcgi
–http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/
var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi
–http-uwsgi-temp-path=/var/lib/nginx/uwsgi
–lock-path=/var/lock/nginx.lock -
-pid-path=/var/run/nginx.pid --with-debug --with-http_addition_module
–with-http_dav_module --with-http_geoip_module --with-http_gzip_stati
c_module --with-http_image_filter_module --with-http_realip_module
–with-http_stub_status_module --with-http_ssl_module
–with-http_sub_mod
ule --with-http_xslt_module --with-ipv6 --with-sha1=/usr/include/openssl
–with-md5=/usr/include/openssl --with-mail --with-mail_ssl_module
–add-module=/root/nginx/nginx-1.1.8/debian/modules/nginx-echo
–add-module=/root/nginx/nginx-1.1.8/debian/modules/nginx-upstream-fair

Thanks

Posted at Nginx Forum:

Hello!

On Sun, Dec 25, 2011 at 03:16:25AM -0500, mojiz wrote:

I don’t know if this is appropriate place or not but there is a bug with
proxy_bind, the directive has to be inside a location to work. I’m sure
this wasn’t true for early versions.

Yes, it’s the bug. Thank you for report.

The bug was always here, since appearence of the proxy_bind
directive. Here is the trac ticket for it:

http://trac.nginx.org/nginx/ticket/40

Maxim D.

Maxim,

Is it possible to also merge the patch that proxy_bind support
variables when you fix this issue?
Thanks in advance.

BR,
DeltaY

2011/12/25 Maxim D. [email protected]:

Hello!

On Mon, Dec 26, 2011 at 10:08:00AM +0800, Delta Y. wrote:

Maxim,

Is it possible to also merge the patch that proxy_bind support
variables when you fix this issue?

Yes. I would like to rewrite the patch though, so it may take
some time.

Maxim D.