Munin,apache以及如何使用密码保护Munin [英] Munin, apache and how to password protect munin

查看:99
本文介绍了Munin,apache以及如何使用密码保护Munin的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Ubuntu上使用apache2和munin服务器.如何使用此用户名和密码对domain.com/munin进行密码保护

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

admin/test101

这是我munin htmldir的位置:

Here is the location of my munin htmldir:

htmldir /var/cache/munin/www

推荐答案

您可以使用.htaccess将基本身份验证添加到apache文件夹中 如果您将munin定位在/var/www/munin,则可以这样做 编辑文件/var/www/munin/.htaccess,在其中放置以下内容

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>

运行命令htpasswd /var/www/munin/.htpasswd admin为管理员用户设置密码

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

这篇关于Munin,apache以及如何使用密码保护Munin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆