Disable download .htpasswd file

If you need to disable download .htpasswd file on nginx web server this solution will help.

location  ~* \.(htpasswd)$ {
      deny all;
    }

If you need to disable download all hidden files:

location ~ /\. {
    deny all;
}

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *