- Creating a password file is done by using the “htpasswd” command like this:
htpasswd -c /httpdocs/foo/.htpasswd fred
The “-c” option creates the file for the first time. Don’t use it if you are adding another user to an existing file. “fred” is the username you are adding. It will then ask you for a password and then to confirm it. After that you should be able to access the URL and be asked for the username and password.