To disable access to folder /admin in Nginx, add following to server block of your web site.
location /admin { deny all; return 404; }
To disable access to some common virtual control software, use
location ~ /\.ht {return 404;} location ~ /\.svn/ {return 404;} location ~ /\.git/ {return 404;} location ~ /\.hg/ {return 404;} location ~ /\.bzr/ {return 404;}
Leave a Reply