Enabling Authentication
There is actually 2 different ways of getting authenticated with apache.
– Basic Authentication: password is passed from client to server in plain text across the network;
– Digest Authentication: password is transmitted as a MD5 digest which is more secure.
In order to avoid to have our password transmitted as clear text, we are going to use the Digest Authentication.
This kind of authentication actually relies on an apache module which is not enable by default: auth_digest.
To enable it, simply run:
sudo a2enmod auth_digest
Now that apache can handle Digest Authentication, we need to set up a user/password/realm using:
htdigest -c /var/www/munin/.htpasswd munin foo