Welcome! Log In Create A New Profile

Advanced

Re: proxy_set_header host

merlin corey
December 29, 2009 04:16PM
On Tue, Dec 29, 2009 at 4:27 AM, Francisco Treacy <lists@ruby-forum.com> wrote:
> Igor Sysoev wrote:
>> There is no "ServerName" header. Probably, you need just
>>
>>         location / {
>>              proxy_pass              http://localhost:9090/app/;
>>         }
>>
>
> This is the first thing I tried. Now I updated nginx to 0.7.x and
> $server_name trick doesn't work anymore. It is still unclear to me how
> to obtain the server name as a header.
>
> Btw, it doesn't have to be an "official" HTTP header... anything will do
> as long as I can obtain the "subdomain.domain.com" in my code.
>
> Could you please show me how?
>
> Thanks!
>
> Francisco
> --
> Posted via http://www.ruby-forum.com/.
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx
>

$http_host and $server_name variables are available for use and you
can pass whatever you want to backend. Please see documents at
http://wiki.nginx.org/NginxHttpProxyModule#proxy_set_header .

-- Merlin

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

proxy_set_header host

Fr Tr December 02, 2009 01:24PM

Re: proxy_set_header host

Francisco Treacy December 02, 2009 02:36PM

Re: proxy_set_header host

Igor Sysoev December 02, 2009 02:52PM

Re: proxy_set_header host

Francisco Treacy December 29, 2009 07:34AM

Re: proxy_set_header host

merlin corey December 29, 2009 04:16PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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