I have started using git for deployment of websites for testing. How do I prevent apache from serving the .git directory contents?
<Directorymatch "^/.*/\.git/"> 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.