Munin, apache and how to password protect munin

て烟熏妆下的殇ゞ 提交于 2019-12-12 12:32:32

问题


I am using apache2 and munin server on Ubuntu. How do I password protect domain.com/munin with this username and password

admin/test101

Here is the location of my munin htmldir:

htmldir /var/cache/munin/www

回答1:


You could add basic authication to apache folder using .htaccess If you munin locate at /var/www/munin , you can do like this edit file /var/www/munin/.htaccess , put the follow content there

   AuthType Basic
   AuthName "Members Only"
   AuthUserFile /var/www/munin/.htpasswd
   <limit GET PUT POST>
   require valid-user
   </limit>

run command htpasswd /var/www/munin/.htpasswd admin to set password for admin user



来源:https://stackoverflow.com/questions/9128394/munin-apache-and-how-to-password-protect-munin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!