版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/henryhu712/article/details/84337496
在配置文件中加上:
location ~ /\.git {
deny all;
}
location ^~ /my/data/directory {
deny all;
}
在配置文件中加上:
location ~ /\.git {
deny all;
}
location ^~ /my/data/directory {
deny all;
}