nginx 目录底下文件禁止访问怎么做?
location ^~ /home/wwwroot/www.xdianying.com/Tpl/q/Home{
deny all;
}
网上搜到上面代码加入配置文件重启nginx,html文件照样可以访问:Q
有没有可用的代码?最好是禁止某个目录下包含下一层目录这种功能。
[ 本帖最后由 indj 于 2011-6-10 20:31 编辑 ] 加在fastcgi那个location的前面才起作用吧。 加在前面了还是无效能访问到html 你写的配置有问题吧
location ~ /(attachments|upload)/.*\.html?$ {
deny all;
}
页:
[1]