
Home » Posts filed under ngix
Wednesday, November 4, 2020
How to block .git in Apache, Nginx and Cloudflare?

How to block .git in Apache, Nginx and Cloudflare?A) NginxIf you are using Nginx you can add the following location directive in nginx.conf filelocation ~ /\.git { deny all;}Alternatively, you can return a 404 error if you don't want an attacker to assume that you have .git...
Subscribe to:
Posts (Atom)