<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px"><div id="yui_3_16_0_1_1490665313755_2566">
        <span itemprop="upvoteCount" title="View upvote and downvote totals" style="cursor: pointer;" id="yui_3_16_0_1_1490665313755_2220" title-off=""><br></span>
        </div>




            
            
<td id="yui_3_16_0_1_1490665313755_2223">
<div id="yui_3_16_0_1_1490665313755_2224">
    <div itemprop="text" id="yui_3_16_0_1_1490665313755_2225">

<div id="yui_3_16_0_1_1490665313755_2226">I am configuring a nginx revser proxy. The result should be when user type <code id="yui_3_16_0_1_1490665313755_2227">http://10.21.169.13/mini</code>, then the request should be <code id="yui_3_16_0_1_1490665313755_2228">proxy_pass to 192.168.1.56:5000</code>. Here is the <code id="yui_3_16_0_1_1490665313755_2229">nginx</code> config:</div>

<pre id="yui_3_16_0_1_1490665313755_2230"><code id="yui_3_16_0_1_1490665313755_2231">server {
        listen 80;
        server_name 10.21.169.13;

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

<div id="yui_3_16_0_1_1490665313755_2232">The above <code id="yui_3_16_0_1_1490665313755_2233">location</code> block never worked with <code id="yui_3_16_0_1_1490665313755_2234">http://10.21.169.13/mini</code>. The only <code id="yui_3_16_0_1_1490665313755_2235">location</code> block worked is:</div>

<pre id="yui_3_16_0_1_1490665313755_2236"><code id="yui_3_16_0_1_1490665313755_2237">server {
        listen 80;
        server_name 10.21.169.13;

        location  / {
                proxy_pass http://192.168.1.65:5000;
                include /etc/nginx/proxy_params;
        }
}
</code></pre>

<div id="yui_3_16_0_1_1490665313755_2238">But the above config also match <code id="yui_3_16_0_1_1490665313755_2239">http://10.21.169.13</code> request which is too board. </div>

<div id="yui_3_16_0_1_1490665313755_2240">What kind of <code id="yui_3_16_0_1_1490665313755_2241">location</code> block will only match '<a href="http://10.21.169.13/mini" rel="nofollow noreferrer" id="yui_3_16_0_1_1490665313755_2242">http://10.21.169.13/mini</a>` and no more?</div><div dir="ltr">
    </div></div></div></td></div></body></html>