I’ve been trying to get Munin monitoring graphs running on Sympl. The graphs are displaying fine but I’m getting the following output from root:
[ERROR] Could not copy contents from /etc/munin/static/ to /srv/example.vs.mythic-beasts.com/public/htdocs/munin at /usr/share/perl5/Munin/Master/HTMLOld.pm line 796.
Does anyone know of a solution to this niggle?
Check the logs for the time it did that and I would guess you will see a permissions/ownership problem.
The default Munin install on Debian adds an Alias for
/munin to every site in Apache, which ends up at
/var/cache/munin/www, but is restricted to local clients only, as in those coming from localhost.
To avoid messing with the default configuration too much and/or moving files around, you can set up access via an alternate method…
# Create a .htaccess to limit access to authenticated users:
echo -e 'AuthUserFile /etc/sympl/munin.htpasswd\nAuthType Basic\nAuthName "Access Restricted"\nRequire valid-user\n' > /var/cache/munin/www/.htaccess
# Create a user and enter the password when prompted
htpasswd -c /home/sympl/munin.htpasswd munin
# Symlink the directory so it's accessible (feel free to use an alternate name for the directory).
ln -s /var/cache/munin/www /srv/example.com/public/htdocs/munin
# Disable the default config and it's built-in alias, and reload apache.
a2disconf munin ; service apache2 reload.
You’ll want to be careful the .htaccess file in the Munin cache directory doesn’t get removed, as that will remove the password requirement, but the basic auth combined with an SSL cert (along with putting it on a less-obvious URL) should help.
Thank you for the instructions above which work up to a point. Unless I’m missing something the final line has no effect:
Can somebody clarify which particular Apache mod were attempting to disable (appear to be a few to choose from) so that I can find a workaround?
Kind regards Pete
Sorry, that should, be
a2disconf munin, which is the config snippet which adds the
/munin alias to each site (but only accessible through localhost).
You shouldn’t need to disable any modules, just the config as it’s managed differently.
I’ll edit the above for anyone finding this later.