Skip to content

Instantly share code, notes, and snippets.

@boynoiz
Last active November 24, 2015 13:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boynoiz/cfcb444a6c5edcffaadf to your computer and use it in GitHub Desktop.
Save boynoiz/cfcb444a6c5edcffaadf to your computer and use it in GitHub Desktop.
munin-froxlor-vhost
# Rewrite rules to serve traffic from the root instead of /munin-cgi
RewriteEngine On
#Static files
RewriteRule ^/favicon.ico /var/www/munin/static/favicon.ico [L]
RewriteRule ^/static/(.*) /var/www/munin/static/$1 [L]
RewriteRule ^/.*/static/(.*) /var/www/munin/static/$1 [L]
# HTML
RewriteCond %{REQUEST_URI} .html$ [or]
RewriteCond %{REQUEST_URI} =/
RewriteRule ^/(.*) /var/www/cgi-bin/munin/munin-cgi/munin-cgi-html/$1 [L]
# Images
RewriteRule ^/munin-cgi/munin-cgi-graph/(.*) /var/www/cgi-bin/munin/munin-cgi/munin-cgi-graph/$1 [L]
<Directory "/var/www/cgi-bin/munin/munin-cgi/">
Options +ExecCGI
AllowOverride all
Require all granted
AuthUserFile "/etc/munin/munin-htpasswd"
AuthName "Authentication Required"
AuthType Basic
Require valid-user
<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>
</Directory>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment