I have munin CGI HTML and CGI graph zoom working but I can't get the CGI graphs to generate. Gentoo's /etc/apache2/vhosts.d/munin.include doesn't reference /munin-cgi/munin-cgi-graph/ which seems odd. The rewrite rules here do reference it: http://munin-monitoring.org/wiki/CgiHowto2 /etc/apache2/vhosts.d/munin.include: ScriptAlias /munin-cgi/ /usr/libexec/munin/cgi/ Alias /munin/static /etc/munin/static <IfDefine MUNIN_HTML_CGI> RewriteEngine on RewriteCond %{REQUEST_URI} (/|\.html)$ RewriteCond %{REQUEST_URI} !/static RewriteRule ^/munin/(.*) /munin-cgi/munin-cgi-html/$1 [PT,L] </IfDefine> <Directory /usr/libexec/munin/cgi/> Options +ExecCGI Order allow,deny Allow from all <IfModule mod_fcgid.c> SetHandler fcgid-script </IfModule> <IfModule !mod_fcgid.c> SetHandler cgi-script </IfModule> </Directory> <Directory /etc/munin/static> Order allow,deny Allow from all </Directory> Reproducible: Always
I should add that I can generate graphs with the instructions here so it seems like a path problem: https://munin.readthedocs.org/en/latest/reference/munin-cgi-graph.html I get the following in error_log when I try to load a CGI graph: "File does not exist: /var/www/localhost/htdocs/munin/com" /var/www/localhost/htdocs/munin/ is empty.
I fixed this by adding the following to /etc/apache2/vhosts.d/munin.include: RewriteRule ^/munin-cgi/munin-cgi-graph/(.*) /$1 RewriteCond %{REQUEST_URI} !^/static RewriteRule ^/(.*.png)$ /munin-cgi/munin-cgi-graph/$1 [L,PT] I got that config from here: http://munin-monitoring.org/wiki/CgiHowto2 The ebuild should be updated.
I just upgraded to munin-2.0.14-r1 and this config change was not included in munin.include so default munin on Gentoo is still in a broken state as far as CGI graphs. Here's the config I added in order to keep it uniform with the current Gentoo config: RewriteCond %{REQUEST_URI} ^/(.*.png)$ RewriteCond %{REQUEST_URI} !^/static RewriteRule ^/munin/(.*) /munin-cgi/munin-cgi-graph/$1 [L,PT]