How do I prevent apache from serving the .git directory?
- by Shoan
I have started using git for deployment of websites for testing. How do I prevent apache from serving the .git directory contents?
I tried
<Directorymatch "^/.*/\.svn/">
Order deny,allow
Deny from all
</Directorymatch>
with no success.
I know that I can create a .htaccess file in each .git directory and deny access, but I wanted something I could put into the main config file that makes this global across all websites.