Nginx 阻止访问特定目录

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/henryhu712/article/details/84337496

在配置文件中加上:

location ~ /\.git {
  deny all;
}
location ^~ /my/data/directory {
  deny all;
}

猜你喜欢

转载自blog.csdn.net/henryhu712/article/details/84337496
今日推荐