From The World according to Vissie
Jump to navigation Jump to search

set a local htpassword file

The first time we use this utility, we need to add the -c option to create the specified file. We specify a username (sammy in this example) at the end of the command to create a new entry within the file:

sudo htpasswd -c /etc/nginx/.htpasswd sammy

You will be asked to supply and confirm a password for the user.

Leave out the -c argument for any additional users you wish to add:

sudo htpasswd /etc/nginx/.htpasswd another_user

Older notes

sudo apt-get install openssl