nginx配置敏感文件限制访问

 

 

敏感文件限制访问:

location ~ /\.ht {

      deny  all;

}

location ~* \.(ini|conf|txt|log|gitignore|sql|bak|inc|old|sh)$ {

      deny all;

}

location ~ .*\.(svn|git) {

     deny all;

}

posted @ 2022-04-14 22:45  我要的我现在就要  阅读(537)  评论(0)    收藏  举报