Skip to content

Instantly share code, notes, and snippets.

@stephenhowells
stephenhowells / gist:4021772
Created November 6, 2012 01:10
Apache conf snippet to hide .git directories and .gitignore files.
# do not allow .git version control files to be issued
<Directorymatch "^/.*/\.git+/">
Order deny,allow
Deny from all
</Directorymatch>
<Files ~ "^\.git">
Order allow,deny
Deny from all
</Files>