File munin-vhost.template of Package munin20
1
<VirtualHost *:80>
2
ServerName munin.example.org
3
ServerAlias munin
4
5
ServerAdmin info@example.org
6
7
DocumentRoot /srv/www/munin.example.org
8
9
ErrorLog /var/log/apache2/munin.example.org-error.log
10
CustomLog /var/log/apache2/munin.example.org-access.log combined
11
12
ServerSignature Off
13
14
Alias /static /etc/munin/static
15
16
# Rewrites
17
RewriteEngine On
18
19
# HTML
20
RewriteCond %{REQUEST_URI} !^/static
21
RewriteCond %{REQUEST_URI} .html$ [or]
22
RewriteCond %{REQUEST_URI} =/
23
RewriteRule ^/(.*) /srv/www/cgi-bin/munin-cgi-html/$1 [L]
24
25
# Images
26
27
# - remove path to munin-cgi-graph, if present
28
RewriteRule ^/cgi-bin/munin-cgi-graph/(.*) /$1
29
30
RewriteCond %{REQUEST_URI} !^/static
31
RewriteCond %{REQUEST_URI} .png$
32
RewriteRule ^/(.*) /srv/www/cgi-bin/munin-cgi-graph/$1 [L]
33
34
<Directory /etc/munin/static>
35
Allow from All
36
</Directory>
37
# Ensure we can run (fast)cgi scripts
38
<Directory "/srv/www/cgi-bin">
39
Options +ExecCGI
40
<IfModule mod_fcgid.c>
41
SetHandler fcgid-script
42
</IfModule>
43
<IfModule !mod_fcgid.c>
44
SetHandler cgi-script
45
</IfModule>
46
</Directory>
47
48
</VirtualHost>
49