Welcome! Log In Create A New Profile

Advanced

How could i proxy_pass to a variable?

Posted by Frank Zack 
How could i proxy_pass to a variable?
March 23, 2012 03:22PM
Nginx Version : 1.0.14

Configuration that works:

location / {
.....
proxy_pass http://www.google.com/
.....

}

Configuration that fails:

location / {
.....
set $target "http://www.google.com";
proxy_pass $target;
.....
}

** i have echo-nginx-module installed.

Both configurations can pass the configuration test with our error.

But the second configuration caused 502 bad gateway error.

Help please!

Thanks in advance.



Edited 2 time(s). Last edit at 03/23/2012 03:29PM by Frank Zack.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

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