<div dir="ltr">so (have a stab at this)<div><br></div><div><pre id="gmail-m_6599137302348679691yui_3_16_0_1_1490665313755_2230" style="white-space:pre-wrap;color:rgb(0,0,0);font-size:13px"><code id="gmail-m_6599137302348679691yui_3_16_0_1_1490665313755_2231">location = /mini {</code></pre><pre id="gmail-m_6599137302348679691yui_3_16_0_1_1490665313755_2230" style="white-space:pre-wrap;color:rgb(0,0,0);font-size:13px"><code><br></code></pre><pre id="gmail-m_6599137302348679691yui_3_16_0_1_1490665313755_2230" style="white-space:pre-wrap;color:rgb(0,0,0);font-size:13px"><code>equals </code></pre><pre id="gmail-m_6599137302348679691yui_3_16_0_1_1490665313755_2230" style="white-space:pre-wrap;color:rgb(0,0,0);font-size:13px"><code><code id="gmail-m_6599137302348679691yui_3_16_0_1_1490665313755_2234" style="white-space:normal"><a href="http://10.21.169.13/mini" target="_blank">http://10.21.169.13/mini</a> and not </code> <code id="gmail-m_6599137302348679691yui_3_16_0_1_1490665313755_2234"><a href="http://10.21.169.13/mini" target="_blank">http://10.21.169.13/mini</a>/ or anything else </code><br></code> <code id="gmail-m_6599137302348679691yui_3_16_0_1_1490665313755_2234"><a href="http://10.21.169.13/mini" target="_blank">http://10.21.169.13/mini</a>/*</code></pre><pre id="gmail-m_6599137302348679691yui_3_16_0_1_1490665313755_2230" style="white-space:pre-wrap;color:rgb(0,0,0);font-size:13px"><code><br></code></pre><pre id="gmail-m_6599137302348679691yui_3_16_0_1_1490665313755_2230" style="white-space:pre-wrap;color:rgb(0,0,0);font-size:13px"><code>try</code></pre><pre id="gmail-m_6599137302348679691yui_3_16_0_1_1490665313755_2230" style="white-space:pre-wrap;color:rgb(0,0,0);font-size:13px"><code>location </code>/mini {</pre><pre id="gmail-m_6599137302348679691yui_3_16_0_1_1490665313755_2230" style="white-space:pre-wrap;color:rgb(0,0,0);font-size:13px">or</pre><pre id="gmail-m_6599137302348679691yui_3_16_0_1_1490665313755_2230" style="white-space:pre-wrap;color:rgb(0,0,0);font-size:13px"><pre id="gmail-m_6599137302348679691yui_3_16_0_1_1490665313755_2230" style="white-space:pre-wrap"><code id="gmail-m_6599137302348679691yui_3_16_0_1_1490665313755_2231">location  /mini/ {</code></pre><div><code><br></code></div></pre><pre id="gmail-m_6599137302348679691yui_3_16_0_1_1490665313755_2230" style="white-space:pre-wrap;color:rgb(0,0,0);font-size:13px">A</pre></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 28 March 2017 at 12:43, Jun Chen via nginx <span dir="ltr"><<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:13px"><div id="m_6599137302348679691yui_3_16_0_1_1490665313755_2566">
        <span title="View upvote and downvote totals" id="m_6599137302348679691yui_3_16_0_1_1490665313755_2220"><br></span>
        </div>




            
            
<table><tbody><tr><td id="m_6599137302348679691yui_3_16_0_1_1490665313755_2223">
<div id="m_6599137302348679691yui_3_16_0_1_1490665313755_2224">
    <div id="m_6599137302348679691yui_3_16_0_1_1490665313755_2225">

<div id="m_6599137302348679691yui_3_16_0_1_1490665313755_2226">I am configuring a nginx revser proxy. The result should be when user type <code id="m_6599137302348679691yui_3_16_0_1_1490665313755_2227"><a href="http://10.21.169.13/mini" target="_blank">http://10.21.169.13/mini</a></code>, then the request should be <code id="m_6599137302348679691yui_3_16_0_1_1490665313755_2228">proxy_pass to <a href="http://192.168.1.56:5000" target="_blank">192.168.1.56:5000</a></code>. Here is the <code id="m_6599137302348679691yui_3_16_0_1_1490665313755_2229">nginx</code> config:</div>

<pre id="m_6599137302348679691yui_3_16_0_1_1490665313755_2230"><code id="m_6599137302348679691yui_3_16_0_1_1490665313755_2231">server {
        listen 80;
        server_name 10.21.169.13;

        location = /mini {
                proxy_pass <a href="http://192.168.1.65:5000" target="_blank">http://192.168.1.65:5000</a>;
                include /etc/nginx/proxy_params;
        }
}
</code></pre>

<div id="m_6599137302348679691yui_3_16_0_1_1490665313755_2232">The above <code id="m_6599137302348679691yui_3_16_0_1_1490665313755_2233">location</code> block never worked with <code id="m_6599137302348679691yui_3_16_0_1_1490665313755_2234"><a href="http://10.21.169.13/mini" target="_blank">http://10.21.169.13/mini</a></code>. The only <code id="m_6599137302348679691yui_3_16_0_1_1490665313755_2235">location</code> block worked is:</div>

<pre id="m_6599137302348679691yui_3_16_0_1_1490665313755_2236"><code id="m_6599137302348679691yui_3_16_0_1_1490665313755_2237">server {
        listen 80;
        server_name 10.21.169.13;

        location  / {
                proxy_pass <a href="http://192.168.1.65:5000" target="_blank">http://192.168.1.65:5000</a>;
                include /etc/nginx/proxy_params;
        }
}
</code></pre>

<div id="m_6599137302348679691yui_3_16_0_1_1490665313755_2238">But the above config also match <code id="m_6599137302348679691yui_3_16_0_1_1490665313755_2239"><a href="http://10.21.169.13" target="_blank">http://10.21.169.13</a></code> request which is too board. </div>

<div id="m_6599137302348679691yui_3_16_0_1_1490665313755_2240">What kind of <code id="m_6599137302348679691yui_3_16_0_1_1490665313755_2241">location</code> block will only match '<a href="http://10.21.169.13/mini" rel="nofollow noreferrer" id="m_6599137302348679691yui_3_16_0_1_1490665313755_2242" target="_blank">http://10.21.169.13/mini</a>` and no more?</div><div dir="ltr">
    </div></div></div></td></tr></tbody></table></div></div><br>______________________________<wbr>_________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx</a><br></blockquote></div><br></div>