homeserver/roles/mgrote_munin_server/dd
2024-08-12 12:44:55 +02:00

39 lines
1.1 KiB
Text

DirectoryIndex index.php index.html
<VirtualHost *:80>
ServerName munin.mgrote.net
ServerAlias munin
ServerAdmin info@mgrote.net
DocumentRoot /var/www/html/munin.mgrote.net
ErrorLog /var/log/apache2/munin.mgrote.net-error.log
CustomLog /var/log/apache2/munin.mgrote.net-access.log combined
# Rewrites
RewriteEngine On
# Static content in /static
RewriteRule ^/favicon.ico /etc/munin/static/favicon.ico [L]
RewriteRule ^/static/(.*) /etc/munin/static/$1 [L]
# HTML
RewriteCond %{REQUEST_URI} .html$ [or]
RewriteCond %{REQUEST_URI} =/
RewriteRule ^/(.*) /usr/lib/munin/cgi/munin-cgi-html/$1 [L]
# Images
RewriteRule ^/munin-cgi/munin-cgi-graph/(.*) /usr/lib/munin/cgi/munin-cgi-graph/$1 [L]
# Ensure we can run (fast)cgi scripts
<Directory "/usr/lib/munin/cgi">
Options +ExecCGI
<IfModule mod_fcgid.c>
SetHandler fcgid-script
</IfModule>
<IfModule !mod_fcgid.c>
SetHandler cgi-script
</IfModule>
</Directory>
</VirtualHost>