After setting it up in Apache's .htaccess as shown below,
AuthType Basic
AuthName "Only"
AuthUserFile/dirname/.htpasswd
Require valid-user
As shown below, the .htpasswd file omitted the password only for the username.
test:
I'm having trouble logging in well for some reason.
I logged in successfully when I put my username and password in .htapasswd.
I searched a little bit about why I couldn't log in with just my username and Apache documentation, but I couldn't find it on the htaccess/authentication page.
I would appreciate it if you could let me know if anyone understands.
Thank you in advance.
How about setting the password string in the htpasswd file to a hash value such as MD5 instead of plaintext?
htpasswd/dirname/.htpasswd test
Press the return key without entering anything at the password input prompt.
Alternatively, htpasswd-b/dirname/.htpasswd test"
in batch mode.
© 2024 OneMinuteCode. All rights reserved.