title: When using proxy_pass, can /etc/hosts be used to resolve domain names instead of "resolver"?
body: <p>Can <strong>/etc/hosts</strong> be used instead of <strong>resolver</strong> when using <strong>proxy_pass</strong>?</p>
  
  <p>I need to perform a proxy_pass to the same nginx machine. Is there a way to resolve the domains using the machine's /etc/hosts file instead of specifying a DNS server thru the "resolver" property?</p>
  
  <p>This will save me the additional hops needed to reach the same server. I have tried setting up the internal IP mapped to the DNS in /etc/hosts file but nginx is still reading from the DNS server set in the <strong>resolver</strong> property. Or is there a way to make the HTTPProxy module to consider the /etc/hosts file settings?</p>
  
  <p>Thanks for any advice you could share..</p>
  
  <p>This is the same question I posted in the nginx forum:
  <a href="http://forum.nginx.org/read.php?11,218997" rel="noreferrer">http://forum.nginx.org/read.php?11,218997</a></p>