Nginx htpasswd Generator - HTTP Basic Auth Passwords
Generate password hashes for Nginx auth_basic. Create .htpasswd files with APR1-MD5, bcrypt, or SHA-512 crypt. Secure browser-based tool.
Nginx Configuration
# Basic auth for entire server
server {
listen 443 ssl;
server_name example.com;
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/.htpasswd;
location / {
# ...
}
}
# Or protect specific location
location /admin {
auth_basic "Admin Area";
auth_basic_user_file /etc/nginx/admin.htpasswd;
}Password File