Re: Dynamic upstream proxy_pass

2014-04-09 Thread kay
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/

Re: Dynamic upstream proxy_pass

2014-04-09 Thread Makailol Charls
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.

Dynamic upstream proxy_pass

2014-04-09 Thread kay
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