gg
This commit is contained in:
parent
1475f62d6b
commit
af75248af6
1 changed files with 34 additions and 17 deletions
|
@ -1,24 +1,41 @@
|
|||
<VirtualHost *:80>
|
||||
ServerName {{ munin_servername }}
|
||||
ServerAlias munin
|
||||
|
||||
# Redirect requests without /munin to /munin
|
||||
RedirectMatch ^/$ /munin/
|
||||
ServerAdmin info@example.org
|
||||
|
||||
# Existing configuration for serving /munin
|
||||
Alias /munin /var/cache/munin/www
|
||||
<Directory /var/cache/munin/www>
|
||||
Require all granted
|
||||
Options None
|
||||
</Directory>
|
||||
DocumentRoot /var/www
|
||||
|
||||
# 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
|
||||
<Location /munin-cgi/munin-cgi-graph>
|
||||
Require all granted
|
||||
<IfModule mod_fcgid.c>
|
||||
SetHandler fcgid-script
|
||||
</IfModule>
|
||||
<IfModule !mod_fcgid.c>
|
||||
SetHandler cgi-script
|
||||
</IfModule>
|
||||
</Location>
|
||||
ScriptAlias /munin-cgi/munin-cgi-html /usr/lib/munin/cgi/munin-cgi-html
|
||||
|
||||
<Directory /etc/munin/static>
|
||||
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>
|
||||
|
||||
CustomLog /var/log/apache2/munin.example.org-access.log combined
|
||||
ErrorLog /var/log/apache2/munin.example.org-error.log
|
||||
</VirtualHost>
|
||||
# http://guide.munin-monitoring.org/en/latest/example/webserver/apache-cgi.html
|
||||
|
|
Loading…
Reference in a new issue