Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] Add support for uwsgi host and port variables

Maxim Dounin
January 08, 2012 08:22AM
Hello!

On Fri, Jan 06, 2012 at 05:44:35PM -1000, Derrick Petzold wrote:

> Hello,
>
> I added support for setting the following variables:
>
> uwsgi_host - The host and port of the uwsgi server that handled the request.
> uwsgi_port - The port of the uwsgi server that handled the request.

Just a side note: this is incorrect definition, $proxy_host is a
host/port as written in the proxy_pass directive, not a "server
that handled the request".

To list servers used to handle a request the $upstream_addr
variable is available, see here:

http://nginx.org/en/docs/http/ngx_http_upstream_module.html#variables

> They are modeled after the proxy_host and proxy_port variables. (I
> shamelessly copied that code). The major change is that the uwsgi
> module now has its own context structure whereas before it was using
> ngx_http_status_t. Please let me know if you have any questions or
> comments.

The main reason why $proxy_host exists is that it's needed to
create correct http request with a Host header from a proxy_pass
directive. It's mostly internal variable. Why this is
needed for uwsgi (and not fastcgi/scgi)?

Maxim Dounin

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

[PATCH] Add support for uwsgi host and port variables

derrick 1665 January 07, 2012 10:38AM

Re: [PATCH] Add support for uwsgi host and port variables

Maxim Dounin 734 January 08, 2012 08:22AM



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

Online Users

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