Although it may not be a common occurrence, I had the opportunity to add an ID/password to Basic Authentication, so I’m leaving a note for future reference.
In conclusion, the method is simply to add accounts by writing them line by line in the “.htpasswd” file.
Edit the .htpasswd file.
In the case of an .htpasswd file like the following.
user1:usCF2.8dJof7Q
You can simply add a new ID/password by placing it on a new line, as shown below, allowing multiple accounts to log in.
user1:usCF2.8dJof7Q
user2:us3HhKtHHqM0U // Add
With this, you’ll be able to log in using the ID “user2” as well!
As a note, the passwords in the .htpasswd file need to be encrypted, and you can generate them from the following.
.htaccess用暗号化パスワード生成機