link
apache/htpasswd

Create Password File

Create password protected directory

security
authentication

Command

sudo htpasswd -c /etc/apache2/.htpasswd username

Examples

Create new password file

sudo htpasswd -c /etc/apache2/.htpasswd username

Add another user

sudo htpasswd /etc/apache2/.htpasswd anotheruser