So nutzt du: Htpasswd Generator
- Enter a username and password (or generate a strong password).
- Keep bcrypt unless your server is very old.
- Click Add user; repeat for more users.
- Copy the lines into your
.htpasswdfile or download it.
What is an .htpasswd file?
An .htpasswd file stores usernames and password hashes for HTTP Basic Authentication — the browser login prompt used to protect staging sites, admin areas and internal tools. Each line is username:hash.
Algorithms
| Format | Prefix | Security | Supported by |
|---|---|---|---|
| bcrypt | $2y$ | Strong, salted, slow | Apache 2.4+, Nginx (via system crypt on most Linux), Traefik, Caddy |
| APR1-MD5 | $apr1$ | Salted but fast — weak by today’s standards | Apache, Nginx everywhere |
| SHA1 | {SHA} | Unsalted — avoid | Apache, Nginx |
Using the file
Apache (.htaccess or vhost):
AuthType Basic
AuthName "Restricted"
AuthUserFile /etc/apache2/.htpasswd
Require valid-user
Nginx:
location /admin/ {
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/.htpasswd;
}
Keep the file outside the web root and readable only by the server (for example chmod 640). Basic Auth sends the password with every request, so only use it over HTTPS.
Nginx may not accept bcrypt on systems where its crypt() lacks support (some Alpine images); use APR1 there. Generate single bcrypt hashes with the bcrypt generator.
Auch gesucht als: htpasswd online, nginx basic auth password, apache htpasswd, generate htpasswd, traefik basic auth.
Passende Tools zu: Htpasswd Generator
- Passwortgenerator — Erstelle sichere, wirklich zufällige Passwörter oder leicht einzutippende Passphrasen – mit erweiterten Regeln: Wörter ein- oder ausschließen, Zeichen vorschreiben, zulässige Symbole auswählen, Wiederholungen und Sequenzen vermeiden.
- Nginx-Konfigurationsgenerator — Wähle aus, was Nginx tun soll – eine statische Website oder ein SPA bereitstellen, als Proxy für eine Node-/Python-App fungieren oder PHP ausführen – und setze ein Häkchen bei den Zusatzoptionen.
- Chmod-Rechner — Setze die Häkchen bei „Lesen“, „Schreiben“ und „Ausführen“ für Eigentümer, Gruppe und andere – oder gib Folgendes ein 755, rwxr-xr-x oder u=rwx,g=rx,o=rx.
- Hash Generator — Compute MD5 and SHA hashes of any text or file instantly, create HMAC signatures, and paste an expected checksum to verify a download.
Häufige Fragen
Does Nginx support bcrypt in .htpasswd?
crypt() function. On systems without bcrypt support (for example some Alpine images), use APR1-MD5.