so (have a stab at this)

location = /mini {


equals

http://10.21.169.13/mini and not  http://10.21.169.13/mini/ or anything else
 http://10.21.169.13/mini/*


try

location /mini {

or

location  /mini/ {


A


On 28 March 2017 at 12:43, Jun Chen via nginx <[email protected]> wrote:

>
> I am configuring a nginx revser proxy. The result should be when user type
> http://10.21.169.13/mini, then the request should be proxy_pass to
> 192.168.1.56:5000. Here is the nginx config:
>
> server {
>         listen 80;
>         server_name 10.21.169.13;
>
>         location = /mini {
>                 proxy_pass http://192.168.1.65:5000;
>                 include /etc/nginx/proxy_params;
>         }
> }
>
> The above location block never worked with http://10.21.169.13/mini. The
> only location block worked is:
>
> server {
>         listen 80;
>         server_name 10.21.169.13;
>
>         location  / {
>                 proxy_pass http://192.168.1.65:5000;
>                 include /etc/nginx/proxy_params;
>         }
> }
>
> But the above config also match http://10.21.169.13 request which is too
> board.
> What kind of location block will only match 'http://10.21.169.13/mini`
> and no more?
>
> _______________________________________________
> nginx mailing list
> [email protected]
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to