Setup website authentication on Apache

If you want to setup a basic authentication mechanism on an Apache website you can follow these simple steps. You can create a user using htpasswd: sudo htpasswd -c /etc/apache2/passwords username You can then add the following lines in your Apache site config file (eg /etc/apache2/sites-available/default under the <Directory /> section) AuthType…

Continue reading