Skip to content

Instantly share code, notes, and snippets.


tja/nginx.conf Secret

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

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