Nginx – read value from redis and store it into variable
===

Is there any way to read redis value and store it into nginx variable?

I want to use it for multi-domain website, where subdomains will point to different IPs. All the subdomains will be stored in redis like this:

    "subdomain" => "address_for_proxy_pass"

So what I need is to parse subdomain (done), store it into variable (done) and than make redis query (done) and store the result into variable. How to do this easily?

