2024-08-12 23:46:08 +02:00
|
|
|
<VirtualHost *:80>
|
|
|
|
ServerName {{ munin_servername }}
|
|
|
|
|
2024-08-21 20:54:49 +02:00
|
|
|
DocumentRoot /var/www
|
2024-08-12 23:46:08 +02:00
|
|
|
|
2024-08-21 20:54:49 +02:00
|
|
|
# Rewrite rules to serve traffic from the root instead of /munin-cgi
|
|
|
|
RewriteEngine On
|
|
|
|
# Static files
|
|
|
|
RewriteRule ^/favicon.ico /var/cache/munin/www/static/favicon.ico [L]
|
|
|
|
RewriteRule ^/static/(.*) /var/cache/munin/www/static/$1 [L]
|
|
|
|
# HTML
|
|
|
|
RewriteRule ^(/.*\.html)?$ /munin-cgi/munin-cgi-html/$1 [PT]
|
|
|
|
# Images
|
|
|
|
RewriteRule ^/munin-cgi/munin-cgi-graph/(.*) /$1
|
|
|
|
RewriteCond %{REQUEST_URI} !^/static
|
|
|
|
RewriteRule ^/(.*.png)$ /munin-cgi/munin-cgi-graph/$1 [L,PT]
|
|
|
|
ScriptAlias /munin-cgi/munin-cgi-graph /usr/lib/munin/cgi/munin-cgi-graph
|
|
|
|
ScriptAlias /munin-cgi/munin-cgi-html /usr/lib/munin/cgi/munin-cgi-html
|
|
|
|
|
|
|
|
<Directory /etc/munin/static>
|
|
|
|
Require all granted
|
2024-08-12 23:46:08 +02:00
|
|
|
</Directory>
|
|
|
|
|
2024-08-21 20:54:49 +02:00
|
|
|
<Directory /var/cache/munin/www/>
|
|
|
|
Require all granted
|
|
|
|
</Directory>
|
|
|
|
|
|
|
|
<Directory /usr/lib/munin/cgi>
|
|
|
|
Require all granted
|
|
|
|
<IfModule mod_fcgid.c>
|
|
|
|
SetHandler fcgid-script
|
|
|
|
</IfModule>
|
|
|
|
<IfModule !mod_fcgid.c>
|
|
|
|
SetHandler cgi-script
|
|
|
|
</IfModule>
|
|
|
|
</Directory>
|
2024-08-12 23:46:08 +02:00
|
|
|
</VirtualHost>
|