Munin 在 Ubuntu 中无法创建 html 文件

Munin 在 Ubuntu 中无法创建 html 文件

我在 Ubuntu Server 14.04 上安装了 Munin,Apache 2.4.7

但完成所有配置后,Munin 并未在 html 目录中创建 html 文件。以下是我的文件:

munin.conf

dbdir     /var/lib/munin
htmldir   /var/www/www/munin  
logdir    /var/log/munin
rundir    /var/run/munin

# Where to look for the HTML templates
#
tmpldir /etc/munin/templates

[MuninMaster]
    address 127.0.0.1
    use_node_name yes

还有我的 apache.conf

    Alias /munin /var/www/www/munin
<Directory /var/www/www/munin>
        #Order allow,deny
        #Allow from localhost 127.0.0.0/8 ::1
        #Options None
    Require all granted
        Options FollowSymLinks SymLinksIfOwnerMatch
    # 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/cache/munin/www) must have "AllowOverride all" or something 
    # close to that set.
    #

    # AuthUserFile /etc/munin/munin-htpasswd
    # AuthName "Munin"
    # AuthType Basic
    # require valid-user

    # This next part requires mod_expires to be enabled.
    #

    # Set the default expiration time for files to 5 minutes 10 seconds from
    # their creation (modification) time.  There are probably new files by
    # that time. 
    #

    <IfModule mod_expires.c>
        ExpiresActive On
        ExpiresDefault M310
    </IfModule>

</Directory> 

但是当我访问 myip/munin 时,出现了 403 Forbidden。查看 /var/www/www/munin 时,里面没有文件。(在此之前,我有 /var/www/munin,但无论如何都不起作用)。

有什么提示吗?

答案1

首先,这是一个拼写错误吗:htmldir /var/www/www/munin

如果是,让我们确保munin用户有权访问该目录。测试一下:

  1. 使/var/www/munin所有者为munin

    $ sudo chown munin: /var/www/munin 
    
  2. 手动运行作业并检查输出是否有错误:

    $ sudo sudo -u munin /usr/bin/munin-cron --debug 2>&1 | less
    

相关内容