ユーザー名とパスワードが機能しない (BASIC AUTH)

ユーザー名とパスワードが機能しない (BASIC AUTH)
AuthType Basic
AuthName "staging"
AuthUserFile "/etc/httpd/pass/password"
require valid-user

これを見ると、/etc/httpd/pass/passwordの中に

なるほど

example1:justanexample
example2:dasd
example3:notatruepass

Apache がユーザー名とパスワードを要求したときに、これらの資格情報はいずれも機能しません。

答え1

によるとマニュアル次のようにしてパスワード ファイルを生成してみてください:

# Delete plain text password file
rm /etc/httpd/pass/password
# Generate first user
htpasswd -c /etc/httpd/pass/password example1
# Type a password
# Do it again
htpasswd -c /etc/httpd/pass/password example2
htpasswd -c /etc/httpd/pass/password example3

関連情報