Now that I have nginx setup I need to be able to hide my .git directories. What kind of rewrite would I need to stop prying eyes? And where in the server {} or http {} block would it go?
Now that I have nginx setup I need to be able to hide my
Share
This
locationdirective will deny access to any.gitdirectory in any subdirectory.Note: This location block must be before your main location block, so that it can be evaluated first.