Skip to content

Instantly share code, notes, and snippets.


tja/httpd.conf Secret

Created Dec 20, 2022
What would you like to do?
Prevent Git repository exposure in Apache
<DirectoryMatch "^/.*/\.git/">
Deny from all
Copy link

tja commented Dec 20, 2022

Don't forget to restart Apache after making the change, e.g. on Debian:

sudo systemctl restart apache2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment