Basic auth using .htaccess and .htpasswd.

July 27, 2019 - Reading time: ~1 minute

.htaccess:
Authtype Basic
AuthName “Put whatever you want here”
AuthUserFile /var/www/vhosts/.htpasswd
Require valid-user

.htpasswd:
htpasswd .htpasswd bob