Welcome! Log In Create A New Profile

Advanced

Variables disallowed in first proxy_redirect parameter?

Maxim Khitrov
November 23, 2009 01:42PM
Hello all,

Is it not possible to use variables in the first parameter to
proxy_redirect directive? I ran some experiments and it seems that
given the following two configurations, only the second one works,
even though $host == "site.domain.com":

proxy_redirect http://$host/ https://$host/;
proxy_redirect http://site.domain.com/ https://$host/;

I've looked at the Location headers being returned in both cases, so I
know what $host is set to in the second (working) example.
Furthermore, I also tried this config:

set $myhost site.domain.com;
proxy_redirect http://$myhost/ https://$myhost/;
proxy_redirect http://site.domain.com/ https://$myhost/;

Same result - only the second version works. Is this a bug or by design?

- Max

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

Variables disallowed in first proxy_redirect parameter?

Maxim Khitrov November 23, 2009 01:42PM

Re: Variables disallowed in first proxy_redirect parameter?

Maxim Dounin November 24, 2009 04:26AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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