Linux – Munin not creating html files in Ubuntu

apache-2.4linuxmonitoringmuninUbuntu

I installed Munin in a Ubuntu Server 14.04 with Apache 2.4.7

But after all configuration, Munin isn't creating the html files in the html dir. This are my files:

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

And my 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> 

But when i go to myip/munin i have a 403 Forbidden. And looking into /var/www/www/munin theres no files in it. (Before that, i had /var/www/munin but doesn't work anyway).

Any hints?

Best Answer

First, is this a typo: htmldir /var/www/www/munin

If it is, let's make sure the munin user has access to the directory. To test it:

  1. Make /var/www/munin owned by munin:

    $ sudo chown munin: /var/www/munin 
    
  2. Run a job manually and check the output for errors:

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