Last active
November 24, 2015 13:05
-
-
Save boynoiz/cfcb444a6c5edcffaadf to your computer and use it in GitHub Desktop.
munin-froxlor-vhost
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
# 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