Create a (hidden) file to hold the passwords (in an area that is not accessible to
others or the web server).
- Make a directory OUTSIDE the web server accessible directory structure to hold your
file (for example: /home/vogelnet/pw_files)
- Create the password file with the following command (subsequent additions to this file do not use the -c (create) attribute.):
htpasswd -c <<passwordFilePath&Name>> <<username>>
An example:
htpasswd -c /home/vogelnet/pw_files/.users dvogel
You are asked to enter a password and then to repeat it. After this is successfully completed the file created (in this case .users) looks like this (note that password after the colon and is encrypted):
dvogel:3xaml49Qn7DV2
Now add another user:
htpasswd /home/vogelnet/pw_files/.users user1
after successful entry of the password the file .users looks like this:
dvogel:3xaml49Qn7DV2
user1:wXnnNeHvIPIhI
and so on...