Welcome! Log In Create A New Profile

Advanced

Re: Making new server parameter inside upstream block

Maxim Dounin
February 12, 2015 08:38AM
Hello!

On Wed, Feb 11, 2015 at 09:40:12PM +0300, Дмитрий Шалашов wrote:

> Hi!
>
> As far as I see Nginx have limited number of possible server parameters
> inside upstream block. It is enforced by function ngx_http_upstream_server for
> example.
> Now, having my own upstream module how can I approach the task of adding a
> couple more parameters to a servers inside it?

You can't. Parameters of the "server" directive are not currently
extendable.

> I would like to find a solution without resorting to patch Nginx source
> code, resilient to Nginx updates (self-contained, in other words) and
> having that -- as simple as possible.
>
> I have to confess that this module is the only piece of C code I've ever
> wrote, and I was "taking inspiration" from other modules :-)
> My best guess so far is overriding ngx_http_upstream_server (googling shows
> it's likely possible) with my own function which will find my new
> parameters, remove them from cf->conf and then call original function.

While this approach may work, it will likely result in big
problems in the future.

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Making new server parameter inside upstream block

skaurus 608 February 11, 2015 01:42PM

Re: Making new server parameter inside upstream block

Maxim Dounin 316 February 12, 2015 08:38AM

Re: Making new server parameter inside upstream block

skaurus 348 February 12, 2015 09:22AM

Re: Making new server parameter inside upstream block

Maxim Dounin 304 February 12, 2015 09:54AM

Re: Making new server parameter inside upstream block

skaurus 298 February 12, 2015 03:12PM

Re: Making new server parameter inside upstream block

Maxim Dounin 322 February 13, 2015 08:14AM

Re: Making new server parameter inside upstream block

skaurus 310 March 04, 2015 09:20AM



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

Online Users

Guests: 180
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