munin 2.0 apache conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Alias /munin /var/cache/munin/www | |
<Directory /var/cache/munin/www> | |
# Rewrite rules to serve traffic from the root instead of /munin-cgi | |
RewriteEngine On | |
# Static files | |
RewriteRule ^/favicon.ico /var/cache/munin/www/static/favicon.ico [L] | |
RewriteRule ^/static/(.*) /var/cache/munin/www/static/$1 [L] | |
# HTML | |
RewriteRule ^$ /munin-cgi/munin-cgi-html/index.html [PT] | |
RewriteCond %{REQUEST_URI} !^/munin/static | |
RewriteRule ^(.*.html)$ /munin-cgi/munin-cgi-html/$1 [L,PT] | |
# Images | |
RewriteRule ^/munin-cgi/munin-cgi-graph/(.*) /$1 | |
RewriteCond %{REQUEST_URI} !^/munin/static | |
RewriteRule ^/(.*.png)$ /munin-cgi/munin-cgi-graph/$1 [L,PT] | |
</Directory> | |
# Ensure we can run (fast)cgi scripts | |
ScriptAlias /munin-cgi/munin-cgi-graph /usr/lib/munin/cgi/munin-cgi-graph | |
<Location /munin-cgi/munin-cgi-graph> | |
Options +ExecCGI | |
<IfModule mod_fcgid.c> | |
SetHandler fcgid-script | |
</IfModule> | |
<IfModule mod_fastcgi.c> | |
SetHandler fastcgi-script | |
</IfModule> | |
<IfModule !mod_fastcgi.c> | |
<IfModule !mod_fcgid.c> | |
SetHandler cgi-script | |
</IfModule> | |
</IfModule> | |
Allow from all | |
# Replace above with "Require all granted" if running apache 2.4 | |
</Location> | |
ScriptAlias /munin-cgi/munin-cgi-html /usr/lib/munin/cgi/munin-cgi-html | |
<Location /munin-cgi/munin-cgi-html> | |
Options +ExecCGI | |
<IfModule mod_fcgid.c> | |
SetHandler fcgid-script | |
</IfModule> | |
<IfModule mod_fastcgi.c> | |
SetHandler fastcgi-script | |
</IfModule> | |
<IfModule !mod_fastcgi.c> | |
<IfModule !mod_fcgid.c> | |
SetHandler cgi-script | |
</IfModule> | |
</IfModule> | |
Allow from all | |
# Replace above with "Require all granted" if running apache 2.4 | |
</Location> | |
<IfModule !mod_rewrite.c> | |
<Location /munin-cgi/munin-cgi-html/static> | |
# this needs to be at the end to override the above sethandler directives | |
Options -ExecCGI | |
SetHandler None | |
</Location> | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment