title: nginx subdomain
body: <p>Ok I can't seem to get it, I've checked nginx forum, not much help there either.  I thought this would be simple.  I want defined subdomains to go to a different url/port.  i.e.</p>
  
  <pre><code>DNS site.com goes to 192.168.1.1 w/ masking
  DNS www.site.com goes 192.168.1.1 w/ masking
  DNS red.site.com goes 192.168.1.1 w/ masking
  DNS blue.site.com goes to 192.168.1.1 w/ masking
  </code></pre>
  
  <p>I want site.com and www.site.com to function as normal, but I want red.site.com to go to 192.168.1.2:5000 and blue.site.com to go to 192.168.1.2:6000/temp/</p>
  
  <p>etc, etc....I'm not even sure I care what displays in the address bar, I guess it would be nice if it stayed red.site.com, but it's not important.  I've tried a proxy pass a url rewrite, clearly I am doing something wrong.  Is this even possible?</p>