how to configure Munin-2.0.x to generate content with CGI (only) on Fedora? how to configure Munin-2.0.x to generate content with CGI (only) on Fedora? apache apache

how to configure Munin-2.0.x to generate content with CGI (only) on Fedora?


The problem is that, if you use the configuration in a "location" based setup (rather than in a VirtualHost"), the flag for the RewriteRule is wrong.

As per mod_rewrite docu:

 L  Stop the rewriting process immediately and don't apply any more rules.

However, in your case you want /munin/cgi/munin-cgi-html to be passed on so that the ScriptAlias actually triggers. Thus:

 PT Forces the resulting URI to be passed back to the URL mapping engine for    processing of other URI-to-filename translators, such as Alias or Redirect

If you change your rules to read

RewriteRule ^/(.*)  /munin/cgi/munin-cgi-html/$1 [PT]  ....  RewriteRule ^/(.*)  /munin/cgi/munin-cgi-graph/$1 [PT]

Note the relative path, as otherwise the ScriptAlias doesn't work.


I had exactly the same problem and I struggled for a while, but I eventually came up with the following config which should do exactly what you want.

My system is Ubuntu Server 12.10. For some reasons my static files are located at /var/cache/munin/www, I'm not sure whether this is standard on Ubuntu or it was caused by my recent upgrade from Ubuntu 12.04.

    RewriteEngine On    # HTML    RewriteRule ^/munin/(.*\.html)?$ /munin/munin-cgi/munin-cgi-html/$1 [PT]    # Images    RewriteRule ^/munin/munin-cgi/munin-cgi-graph/(.*) /munin/$1    RewriteCond %{REQUEST_URI} !^/static    RewriteRule ^/munin/(.*.png)$ /munin/munin-cgi/munin-cgi-graph/$1 [L,PT]    <Directory /var/cache/munin/www/>            Order deny,allow            Allow from all    </Directory>    # Ensure we can run (fast)cgi scripts    ScriptAlias /munin/munin-cgi/munin-cgi-graph /usr/lib/cgi-bin/munin-cgi-graph    <Location /munin/munin-cgi/munin-cgi-graph>            Options +ExecCGI            SetHandler fcgid-script            Allow from all    </Location>    ScriptAlias /munin/munin-cgi/munin-cgi-html /usr/lib/cgi-bin/munin-cgi-html    <Location /munin/munin-cgi/munin-cgi-html>            Options +ExecCGI            SetHandler fcgid-script            Allow from all    </Location>


Ensure munin-cgi is installed and the dependencies: mod_fcgid.

CentOS 7, no special parameters added to the file configuration located at /etc/httpd/conf.d/munin.conf.

Regards.