사용자 이름과 비밀번호가 작동하지 않습니다(기본 인증)

사용자 이름과 비밀번호가 작동하지 않습니다(기본 인증)
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

관련 정보