这可能是其中之一当然!答案,但我花了一整晚的时间查找 Munin 上的教程和常见问题解答,但似乎找不到答案。
我已安装 Munin,并尝试使用 Apache 提供显示图表的页面。我的 /etc/munin/munin.conf 如下所示:
dbdir /var/lib/munin
htmldir /var/www/html/munin
logdir /var/log/munin
rundir /var/run/munin
tmpldir /etc/munin/templates
[localhost]
address 127.0.0.1
use_node_name yes
如您所见,HTMLdir 设置为 /var/www/html/munin。在该目录中,我有以下文件:
我正在尝试使用 apache 作为status.*mydomain*.com
包含所有 Munin 图表的仪表板。我的 /etc/httpd/conf/httpd.conf 有一个如下所示的虚拟主机:
<VirtualHost *:80>
ServerName status.*mydomain*.com
DirectoryIndex ###WTF IS THIS????
DocumentRoot /var/www/html/munin
</VirtualHost>
<directory /var/www/html/munin/>
AllowOverride None
Options ExecCGI FollowSymlinks
AddHandler cgi-script .cgi
# DirectoryIndex index.cgi
AuthUserFile /etc/munin/munin.passwd
AuthType basic
AuthName "Munin stats"
require valid-user
</directory>
我的问题是,我不知道它DirectoryIndex
需要什么。我看到的唯一看起来像 Apache 知道如何提供的文件是definitions.html
,我尝试这样做,但该页面没有任何图表。我读过的每个教程都掩盖了这个细节,所以我不确定默认情况下它应该是什么。
附言:如果有帮助的话,我检查了 cron 日志,是的,我知道 Munin 每 5 分钟运行一次更新图表。我只是不知道如何正确地使用它们!谢谢!!
编辑:.htaccess 看起来像默认的 Munin:
# This file can be used as a .htaccess file, or a part of your apache
# config file.
#
# For the .htaccess file option to work the munin www directory
# (/var/www/html/munin) must have "AllowOverride all" or something close
# to that set.
#
# As a config file enclose it in <directory> like so:
#
# <directory /var/www/html/munin>
AuthUserFile /etc/munin/munin-htpasswd
AuthName "Munin"
AuthType Basic
require valid-user
# This next part requires mod_expires to be enabled.
#
# We could use <IfModule mod_expires> around here, but I want it to be
# as evident as possible that you either have to load mod_expires _or_
# you coment out/remove these lines.
# Set the default expiery time for files 5 minutes 10 seconds from
# their creation (modification) time. There are probably new files by
# that time.
ExpiresActive On
ExpiresDefault M310
# </directory>
答案1
DirectoryIndex
应该是index.html
。一旦启动munin-node
(或运行/usr/bin/munin-cron
)它将自动生成。