htpasswdを用いたBasic認証を設定する
from 20240928
htpasswdを用いたBasic認証を設定する
Apache HTTP Serverでhtpasswdを用いたBasic認証を設定する
使用するモジュールは以下。
mod_auth_basic
mod_authn_file
mod_authz_user
code:sh
a2enmod auth_basic authn_file authz_user
code:sh
htpasswd -c /etc/apache2/.htpasswd <username>
デフォルトではMD5でパスワードがハッシュ化されるみたいなので、bcryptを使ってみる
Force MD5 encryption of the password (default).
bcryptは確かRcloneのcryptモジュールでも使われていた気がする
Force bcrypt encryption of the password (very secure).