nginx 目录匹配规则

参考:https://www.cnblogs.com/duhuo/p/8323812.html

 

location ^~ /tea/ {  
   root /usr/local/nginx/html/;  
}
  • 请求:http://test.com/tea/tea1.html
  • 实际访问:/usr/local/nginx/html/tea/tea1.html 文件,root    实际访问文件路径会拼接URL中的路径

 

Proxy Pass 匹配规则:

 

posted on   rigidwang  阅读(1958)  评论(1编辑  收藏  举报

努力加载评论中...
< 2025年2月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 1
2 3 4 5 6 7 8

统计

点击右上角即可分享
微信分享提示