Skip to content

Instantly share code, notes, and snippets.

@tja

tja/httpd.conf Secret

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

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