780ce55
# http://munin.readthedocs.org/en/latest/example/webserver/apache-virtualhost.html
780ce55
<VirtualHost *:80>
780ce55
    #ServerName munin.example.org
780ce55
    #ServerAlias munin
780ce55
    #ServerAdmin  info@example.org
780ce55
780ce55
    DocumentRoot /var/www/html/munin
780ce55
780ce55
    ErrorLog  /var/log/httpd/munin.example.org-error.log
780ce55
    CustomLog /var/log/httpd/munin.example.org-access.log combined
780ce55
780ce55
    # Rewrites
780ce55
    RewriteEngine On
780ce55
780ce55
    # Static content in /static
780ce55
    RewriteRule ^/favicon.ico /var/www/html/munin/static/favicon.ico [L]
780ce55
    RewriteRule ^/static/(.*) /var/www/html/munin/static/$1          [L]
780ce55
6ec3cb5
    # workaround for some static content
47f6d9c
    RewriteRule /favicon.ico /var/www/html/munin/static/favicon.ico [L]
47f6d9c
    RewriteRule /static/(.*) /var/www/html/munin/static/$1          [L]
6ec3cb5
780ce55
    # HTML
780ce55
    RewriteCond %{REQUEST_URI} .html$ [or]
780ce55
    RewriteCond %{REQUEST_URI} =/
780ce55
    RewriteRule ^/(.*)          /var/www/cgi-bin/munin-cgi-html/$1 [L]
780ce55
780ce55
    # Images
780ce55
    # - remove path to munin-cgi-graph, if present
780ce55
    RewriteRule ^/munin-cgi/munin-cgi-graph/(.*) /$1
780ce55
780ce55
    RewriteCond %{REQUEST_URI} .png$
780ce55
    RewriteRule ^/(.*) /var/www/cgi-bin/munin-cgi-graph/$1 [L]
780ce55
84ae0c2
    #ScriptAlias /munin-cgi/munin-cgi-graph /var/www/cgi-bin/munin-cgi-graph
780ce55
780ce55
    # Ensure we can run (fast)cgi scripts
780ce55
    <Directory "/var/www/cgi-bin">
780ce55
        Options +ExecCGI
780ce55
        <IfModule mod_fcgid.c>
780ce55
            SetHandler fcgid-script
780ce55
        </IfModule>
780ce55
        <IfModule !mod_fcgid.c>
780ce55
            SetHandler cgi-script
780ce55
        </IfModule>
780ce55
    </Directory>
780ce55
</VirtualHost>
08d466b