Skip to main content Logo (IEC resistor symbol)logo

Quis custodiet ipsos custodes?
Home | About | All pages | RSS Feed | Gopher

NGINX: Hide / Block .git and .svn folders

Published: 13-03-2013 | Author: Remy van Elst | Text only version of this article

Table of Contents

This little nginx config snippets helps you prohibit access to .git or .svnfolders in nginx

location ~ /\.git {  deny all;}

It should be places in a server block. Works for both http as well ashttps.

Tags: access, git, nginx, server, snippets, svn