Nginx中禁止访问.txt文件
location ~* \.(txt|doc)$ {
if (-f $request_filename) {
root /home/domain/public_html/test;
break;
}
}
if (-f $request_filename) {
root /home/domain/public_html/test;
break;
}
}
none