example nginx configs updated to 404 all git folder access.

This commit is contained in:
2023-08-11 17:33:21 +00:00
parent 80918eb50a
commit feb3a07edc
2 changed files with 10 additions and 0 deletions
@@ -17,6 +17,11 @@ server {
server_tokens off; # prevent nginx server detection
# restrict access to git folder
location ~ /\.git {
return 404;
}
# optional, enforce primary domain
#if ($host != $server_name) {
# return 301 $scheme://$server_name$request_uri;
+5
View File
@@ -17,6 +17,11 @@ server {
server_tokens off; # prevent nginx server detection
# restrict access to git folder
location ~ /\.git {
return 404;
}
# optional, enforce primary domain
#if ($host != $server_name) {
# return 301 $scheme://$server_name$request_uri;