# 情形D # 下面这段location是错误的 # # nginx -t 时,会报如下错误: # # nginx: [emerg] "proxy_pass" cannot have URI part in location given by regular # expression, or inside named location, or inside "if" statement, or inside # "limit_except" block in /opt/app/nginx/conf/vhost/test.conf:17 # # 当location为正则表达式时,proxy_pass 不能包含URI部分。本例中包含了"/" location ~ /testd { proxy_pass http://127.0.0.1:8801/; # 记住,location为正则表达式时,不能这样写!!! }