location匹配

时间:2023-03-09 02:28:24
location匹配

=/ 表示精确匹配  www.sensetime.com/

~ :表示做正则表达式匹配,区分字符大小写

~* : 表示做正则表达式匹配,不区分大小写

^~: URI的左半部分匹配,不区分大小写

匹配优先级: = 精确匹配, ^~ , ~或~* , 不带符号的URL

location / { }    表示所有匹配

location /documents/ { }