Nginx

Block Nginx from Serving .git Directories

location ~ /\.git {
  deny all;
}

# or, all . directories/files in general (including .htaccess, etc)

location ~ /\. {
  deny all;
}

Leave a Reply

Your email address will not be published. Required fields are marked *