title: Nginx – read value from redis and store it into variable
body: <p>Is there any way to read redis value and store it into nginx variable?</p>
  
  <p>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:</p>
  
  <pre><code>"subdomain" =&gt; "address_for_proxy_pass"
  </code></pre>
  
  <p>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?</p>