Benutzername und Passwort funktionieren nicht (BASIC AUTH)

Benutzername und Passwort funktionieren nicht (BASIC AUTH)
AuthType Basic
AuthName "staging"
AuthUserFile "/etc/httpd/pass/password"
require valid-user

Ich sehe dies und in /etc/httpd/pass/password

Ich verstehe

example1:justanexample
example2:dasd
example3:notatruepass

und keine dieser Anmeldeinformationen funktioniert, wenn Apache einen Benutzernamen und ein Passwort anfordert.

Antwort1

Entsprechenddas Handbuch, versuchen Sie, Ihre Kennwortdatei mit folgendem zu generieren:

# 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

verwandte Informationen