Saturday, August 16, 2008

ENABLE AUTHENTICATION ON DEBIAN APACHE WEB SERVER

Step by Step Guide;

Step 1 Enable Digest Authentication
This authentication does not supported by default
#a2enmod auth_digest

Step 2 Set up user/password/realm
htdigest -c /var/www/munin/.htpasswd munin username
munin is realm and username is username.
supply "username" user password,

Step 3 Making Authentication required
go back to /etc/apache2/sites-available/monitoring.

Options FollowSymLinks
AllowOverride None
#authentification
AuthType Digest
AuthName "munin"
AuthDigestFile /var/www/munin/.htpasswd
#people using apache 2.2 will use instead:
#AuthUserFile /var/www/munin/.htpasswd
require valid-user

Step 4 Reload apache configuration
#apache2ctl -t
Syntax OK
$/etc/init.d/apache2 force-reload

Step 5 Tesing and Running
Now, go to http://monitoring.example.com with your browser. A box should prompt you for a username and password. Supply the one you define above and you should be given access to munin statistics.

No comments: