title: Nginx: when to use proxy_set_header Host $host vs $proxy_host
body: <p>I've been reading up on reverse proxying and am wondering when <code>proxy_set_header Host $host</code> is appropriate over <code>proxy_set_header Host $proxy_host</code>. I did some research and in <a href="https://www.digitalocean.com/community/tutorials/understanding-nginx-http-proxying-load-balancing-buffering-and-caching" rel="noreferrer">this article</a> it says that in most cases we set Host to $host. Then why does nginx default to $proxy_host? To help me understand more concretely, will the reverse proxy configuration <a href="https://whatididtodowhatidid.wordpress.com/2014/03/14/subdomains-for-ports-on-same-ubuntu-server-with-nginx-reverse-proxy/" rel="noreferrer">here</a> (bottom of article) still work if we use $proxy_host instead? </p>
  
  <p>Thanks</p>