Welcome! Log In Create A New Profile

Advanced

Upstream module question.

Roman Savchenko
July 30, 2014 05:34AM
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.
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Upstream module question.

Roman Savchenko 662 July 30, 2014 05:34AM

Re: Upstream module question.

Piotr Sikora 262 July 30, 2014 07:08AM

Re: Upstream module question.

Roman Savchenko 269 July 30, 2014 07:40AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 202
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready