lighttpd.conf
раскомментарить mod_auth
добавить в секцию host или URL
auth.backend = "htdigest"
auth.backend.htdigest.userfile = "/etc/lighttpd/.passwd"
auth.debug = 2
auth.require = ( "/" =>
(
"method" => "digest",
"realm" => "Restricted Area",
"require" => "valid-user"
))
затем в консоли
htdigest -c /etc/lighttpd/.passwd "Restricted Area" login
chown www:www /etc/lighttpd/.passwd
chmod 400 /etc/lighttpd/.passwd