My bad, in one location I forgot to remove port, that is why nginx tried to
resolve upstream as hostname.
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,249142,249145#msg-249145
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/
Hello!
You need to use resolver directive in Nginx.
Also you need to set DNS entries for your backend hostname.
Best regards,
Makailol
On Wed, Apr 9, 2014 at 1:49 PM, kay wrote:
> I'm trying to set upstream names by variables, but nginx recognizes
> variables as hostnames, not upstream names.
I'm trying to set upstream names by variables, but nginx recognizes
variables as hostnames, not upstream names.
For example:
map $cookie_backend $proxy_host {
default 'backend1';
'1' 'backend2';
}
... ... ...
upstream backend1 {
server backend123:8080;
server backen