SpecialistOff.NET / Вопросы / Статьи / Фрагменты кода / Резюме / Метки / Помощь / Файлы

Список вопросов Печать

Генерация файлов с паролями для сайтов


Метки: nginx apache htpasswd htdigest openssl безопасность 

Ответы

RemiZOffAlex  Создано: 2017-02-20 17:25:39.827622  Обновлено: 2017-02-20 17:25:39.827622

Basic

htpasswd -b -c /home/remizoffalex/domains/specialistoff.net/public_html/.htpasswd USERNAME

Digest

htdigest /home/remizoffalex/domains/specialistoff.net/public_html/.htdigest "private area" USERNAME
Adding user USERNAME in realm private area
New password:  
Re-type new password:

specialistoff.net.conf

<VirtualHost *:80>
   ServerName specialistoff.net

   ServerAdmin webmaster@localhost
   DocumentRoot /home/remizoffalex/domains/specialistoff.net/public_html

   ErrorLog "/var/log/apache2/specialistoff.net-error.log"
   CustomLog "/var/log/apache2/specialistoff.net-access.log" common

   <Directory /home/remizoffalex/domains/specialistoff.net/public_html>
       Options +Indexes
       AuthType Digest
       AuthName "private area"
       AuthDigestProvider file
       AuthUserFile "/home/remizoffalex/domains/specialistoff.net/public_html/.htdigest"
       Require valid-user
   </Directory>
</VirtualHost>

 

Возможно будут интересны и другие вопросы