Created
May 13, 2012 15:55
-
-
Save ssm/2689025 to your computer and use it in GitHub Desktop.
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
<VirtualHost *:80> | |
ServerName munin.example.org | |
ServerAlias munin | |
ServerAdmin info@example.org | |
DocumentRoot /srv/www/munin.example.org | |
ErrorLog /var/log/apache2/munin.example.org-error.log | |
CustomLog /var/log/apache2/munin.example.org-access.log combined | |
ServerSignature Off | |
Alias /static /etc/munin/static | |
# Rewrites | |
RewriteEngine On | |
# HTML | |
RewriteCond %{REQUEST_URI} !^/static | |
RewriteCond %{REQUEST_URI} .html$ [or] | |
RewriteCond %{REQUEST_URI} =/ | |
RewriteRule ^/(.*) /usr/lib/cgi-bin/munin-cgi-html/$1 [L] | |
# Images | |
# - compat rewrite (until old templates are fixed) | |
RewriteRule ^/cgi-bin/munin-cgi-graph/(.*) /$1 | |
RewriteCond %{REQUEST_URI} !^/static | |
RewriteCond %{REQUEST_URI} .png$ | |
RewriteRule ^/(.*) /usr/lib/cgi-bin/munin-cgi-graph/$1 [L] | |
# Ensure we can run (fast)cgi scripts | |
<Directory "/usr/lib/cgi-bin"> | |
Options +ExecCGI | |
<IfModule mod_fcgid.c> | |
SetHandler fcgid-script | |
</IfModule> | |
<IfModule !mod_fcgid.c> | |
SetHandler cgi-script | |
</IfModule> | |
</Directory> | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment