Skip to content

Instantly share code, notes, and snippets.

@tja

tja/nginx.conf Secret

Last active Dec 20, 2022
Embed
What would you like to do?
Prevent Git repository exposure in nginx
location ~ /\.git {
deny all;
}
@tja
Copy link
Author

tja commented Dec 20, 2022

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

sudo systemctl restart nginx

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