Munin、apache 以及如何密码保护 munin [英] Munin, apache and how to password protect 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
为admin用户设置密码
run command htpasswd /var/www/munin/.htpasswd admin
to set password for admin user
这篇关于Munin、apache 以及如何密码保护 munin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!