[smokeping-users] how to enforce username/password logons to access smokeping
Murray Davis
murray.g.davis at gmail.com
Wed Mar 21 20:26:14 CET 2012
Thank you to Peter and Dan for their replies. After reading Peter's
response, I started looking at Apache's documentation and got things
working. As I was about to respond to the list server, I noticed Dan's
response which basically confirmed my approach. Here goes:
Step 1: Created an apache username:
htpasswd -c /etc/apache2/passwords smokeping
Step 2: Modified the smokeping config file.../etc/apache2/conf.d/smokeping
ScriptAlias /smokeping/smokeping.cgi
/usr/share/smokeping/cgi-bin/smokeping.cgi
Alias /smokeping /usr/share/smokeping/www
<Directory "/usr/share/smokeping/www">
Options FollowSymLinks
AllowOverride AuthConfig
AuthType Basic
AuthName "Restricted Files"
AuthUserFile /etc/apache2/passwords
Require user cacti
</Directory>
I changed AuthName from "Require Password" to "Restricted Files".
Step 3 Placed an .htaccess file in the root of smokeping's home directory.
I started with placing it in /usr/share/smokeping/www and cgi-bin, but
ended up placing it at the parent level.
AuthType Basic
AuthName "Restricted Files"
AuthUserFile /etc/apache2/passwords
Require user smokeping
I restarted Apache and smokeping and I am now prompted for a
username/password. Only the smokeping user gets in. If I click on the
"Cancel" button on the logon window, I am then met with an Failed
Authorization window whereas when AuthName was "Require Password", I would
be taken to the smokeping webpage.
Thanks for the help...
mgd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/smokeping-users/attachments/20120321/c32928bf/attachment.htm
More information about the smokeping-users
mailing list