title: nginx proxy_pass requests to fqdn without converting to IP
body: <p>I am trying to proxy_pass requests using nginx to a public fqdn.
  The server has LB configured only to respond to requests when accessed using fqdn and get an ssl hand shake error when accessed using IP.</p>
  <p>My issue is that the nginx is implicitly converting the fqdn to set of IPs and trying them one by one and failing.
  Is there a way have nginx proxy_pass without converting the fqdn to IP and route the request to upstream at fqdn?</p>
  <pre><code>        location /public/api {
              proxy_pass https://public.server.com/api;
              proxy_set_header Host $host;
      }
  </code></pre>
  <pre><code>2022/04/24 23:10:20 [error] 912419#912419: *5 peer closed connection in SSL handshake (104: Connection reset by peer) while SSL handshaking to upstream, client: xxxxxxxx, server: _, request: &quot;POST /&lt;api&gt; HTTP/1.1&quot;, upstream: &quot;https://&lt;ip1&gt;:443/&lt;api&gt;&quot;, host: &quot;&lt;ip&gt;&quot;
  2022/04/24 23:10:20 [error] 912419#912419: *5 peer closed connection in SSL handshake (104: Connection reset by peer) while SSL handshaking to upstream, client: xxxxxxxx, server: _, request: &quot;POST /&lt;api&gt; HTTP/1.1&quot;, upstream: &quot;https://&lt;ip2&gt;43/&lt;api&gt;&quot;, host: &quot;&lt;ip&gt;&quot;
  2022/04/24 23:10:20 [error] 912419#912419: *5 peer closed connection in SSL handshake (104: Connection reset by peer) while SSL handshaking to upstream, client: xxxxxxxx, server: _, request: &quot;POST /&lt;api&gt; HTTP/1.1&quot;, upstream: &quot;https://&lt;ip3&gt;:443/&lt;api&gt;&quot;, host: &quot;&lt;ip&gt;&quot;
  </code></pre>