Jun Chen via nginx
March 27, 2017 09:44PM
| 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
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

How to exact match a nginx location?

Jun Chen via nginx March 27, 2017 09:44PM

Re: How to exact match a nginx location?

alexsamad March 28, 2017 12:10AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 242
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready