First you need to cd to that folder
# cd /opt/smokeping
then create a new htpasswd
and add user 'admin'
# htpasswd -c /opt/smokeping/.htpasswd admin
If you have an existing htpasswd file, then you can just update it using
# htpasswd /opt/smokeping/.htpasswd admin
after done, you need to enable this in the apache config
you need to add:
<Directory "/var/www/html/smokeping">
AuthUserFile /opt/smokeping/.htpasswd
AuthType Basic
AuthName "Smokeping Admin Pages"
Require valid-user
</Directory>
Then reload the Apache services
No comments:
Post a Comment