Setting up password authentication with Apache
This is referred to as Apache ‘Basic Auth’. Following these directions will add a username and password prompt to a website or specific webpage. Typically we use this to hide a ‘Dev’ website so it can still be accessible but not open to the public.
Using htpasswd to generate users and passwords Install Dependencies Make sure you have Apache Extended Utilities installed sudo apt update
sudo apt install apache2-utils Create first user with htpasswd sudo htpasswd -c /etc/apache2/htpasswd.