Upstream module question.

Roman Savchenko gmstima at gmail.com
Wed Jul 30 09:32:05 UTC 2014


Hi all,

I'm starting develop my own upstream module. And I have question: How can i
disable server directive in upstream block.

http {
    upstream my_upstream {
            my_endpoint addr port;
    }

    server {
        location / {
            proxy_pass http://my_upstream;
        }
    }
}

As can you see I didn't use server but i used my_endpoint.


After some googling i found ZerroMQ module:
static char *

ngx_http_upstream_zeromq_endpoint(ngx_conf_t *cf, ngx_command_t *cmd,
void *conf)

{

    ngx_http_upstream_srv_conf_t      *uscf;

    uscf = ngx_http_conf_get_module_srv_conf(cf, ngx_http_upstream_module);


....


    THEY USE THIS

    uscf->servers = (ngx_array_t *) -1;

  ...


    return NGX_CONF_OK;

}


But it doesn't work now (nginx closed without any errors/warnings).
Thanks for any help.


Regards,

R. Savchenko.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20140730/cd750120/attachment.html>


More information about the nginx-devel mailing list