示例文件1html
E:\NGINX-TEST
├─a
│ a.html
│
├─b
│ b.html
│
└─c
c.htmlnginx
示例文件2.net
E:\NGINX-TEST2
└─d
d.htmlserver
請求會在依次從文件夾a,b,c,d 下查掃直到找。 找到直接返回,找不到返回404htm
server {
listen 7006;
location / {
root E:/nginx-test/;
try_files /c/$uri /b/$uri /a/$uri $uri @fallback;
}
location @fallback {
root E:/nginx-test2/d/;
}get
}io