title: How to see the resolved proxy_pass URL in Nginx?
body: <p>I have a setup like this for reflecting requests:</p>
  <pre><code>location ~ ^/prefix/string/(.*)$
  {
     proxy_pass https://abc.example.com/$1;
     access_log /var/log/nginx/unique.log logformat
  }
  </code></pre>
  <ol>
  <li>Visit my site at <code>/prefix/string/more_stuff</code></li>
  <li>Logs show 404 with <code>$upstream_addr</code> only containing the IP of <code>abc.example.com</code>,
  <em>not</em> the full URL</li>
  <li>Log lines show up in <code>unique.log</code>, so I know I'm hitting this location block.</li>
  <li>I want to eliminate the possibility that the URL construction with <code>$1</code> is wrong.</li>
  <li>I would like to be able to log the <em>resolved</em> complete <code>proxy_pass</code> URL so I can
  fix it or move on to other types of debugging.</li>
  </ol>
  <p>Note: I realize that I can read docs to figure out nginx's behavior in this case.  But just logging the resolved URL would be way faster if possible.</p>
  <p>Question: How to log the resolved URL that NGINX actually visits for a <code>proxy_pass</code> like this?</p>