Nginx &引用;代理“U通行证”;无法在“内部”中的正则表达式给定的位置中包含URI部分;如果;
我想匹配请求参数并直接到我的网关,我喜欢这样 位置/应用程序/共享{Nginx &引用;代理“U通行证”;无法在“内部”中的正则表达式给定的位置中包含URI部分;如果;,nginx,nginx-location,Nginx,Nginx Location,我想匹配请求参数并直接到我的网关,我喜欢这样 位置/应用程序/共享{ if ($args ~ action=encode) { proxy_pass http://192.168.1.249:11201/openmallservice/corp/app/share/; } } 怎么了?检查一下 /if语句中的proxy\u pass和location~之类的正则表达式中不允许使用/some url/部分 # add uri here and break to sto
if ($args ~ action=encode) {
proxy_pass http://192.168.1.249:11201/openmallservice/corp/app/share/;
}
}
怎么了?检查一下
/if
语句中的proxy\u pass
和location~之类的正则表达式中不允许使用/some url/
部分
# add uri here and break to stop searching another locations
rewrite ^(.*)$ /your-path$1 break;
# proxy without uri
proxy_pass http://111.222.33.44:8000;