位置location作用作为中转站将请求转发给后台服务器代理后台服务器这里使用两个nginx一个作为代理服务一个作为后台服务。proxy_pass指定的地址不以 / 结尾访问http://192.168.242.200/proxy/1.txturi/proxy/1.txtlocation/proxy代理地址http://192.168.242.201转发请求为http://192.168.242.201/proxy/1.txt 代理地址 uriproxy_pass指定的地址以 / 结尾访问http://192.168.242.200/proxy/1.txturi/proxy/1.txtlocation/proxy /proxy 和 /proxy/ 结果一致代理地址http://192.168.242.201/转发请求为http://192.168.242.201/1.txt 代理地址 (uri - location)