Munin、apache 以及如何使用密码保护 munin

发布于 2025-01-02 03:26:38 字数 197 浏览 6 评论 0原文

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

admin/test101

这是我的 munin htmldir 的位置:

htmldir /var/cache/munin/www

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凹づ凸ル 2025-01-09 03:26:38

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

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

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

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文