谷歌优化网站链接怎么做,网站设计代码,大连虚拟主机,wordpress-5.0.2理解nginx的配置有助于理解前后端调用的过程#xff0c;这里是location与proxy_pass需要注意的点 location 不带斜杠 的是模糊匹配#xff0c;例如 location /abc
可以匹配 /abc/index.html#xff0c;也可以匹配 /abcd/index.html location 带斜杠的是固定匹配#xff0c…理解nginx的配置有助于理解前后端调用的过程这里是location与proxy_pass需要注意的点 location 不带斜杠 的是模糊匹配例如 location /abc
可以匹配 /abc/index.html也可以匹配 /abcd/index.html location 带斜杠的是固定匹配例如 location /abc/
只能匹配 /abc/index.html不能匹配 /abc/index.html proxy_pass 后面不带斜杠会进行拼接例如
location /abc/ { proxy_pass http://127.0.0.1:8080; }
访问 http://127.0.0.1/abc/ ---------------------------- 实际访问 http://127.0.0.1:8080/abc/ proxy_pass 后面不带斜杠会进行截取例如
location /docs/ { proxy_pass http://127.0.0.1:8080/; }
访问 http://127.0.0.1/docs/ ------------- 实际访问 http://127.0.0.1:8080/