If you need to disable download .htpasswd file on nginx web server this solution will help.
1 2 3 |
location ~* \.(htpasswd)$ { deny all; } |
If you need to disable download all hidden files:
1 2 3 |
location ~ /\. { deny all; } |