web服务器安全之 禁止访问含有特定字符的目录

来源:互联网 发布:网络暴力 英文 编辑:程序博客网 时间:2024/04/28 19:47
  1. 1. httpd/apache

    如取消对 .svn 的访问
   
        Order allow,deny
        Deny from all
 

这个设定可以放在所有的虚拟主机外面

  1. 2. nginx

            location ~ //.svn {
                deny  all;
            }

这个设定必须放在每个 vhosts.conf 中