htpasswd Command Examples

Create and manage htpasswd files to protect web server directories using basic authentication. More information: https://httpd.apache.org/docs/current/programs/htpasswd.html.

htpasswd -c {{path/to/file}} {{username}}

htpasswd {{path/to/file}} {{username}}

htpasswd -b {{path/to/file}} {{username}} {{password}}

htpasswd -D {{path/to/file}} {{username}}

htpasswd -v {{path/to/file}} {{username}}

htpasswd -nbm {{username}} {{password}}