Tidy up munin www config
authorTom Hughes <tom@compton.nu>
Mon, 16 Mar 2015 09:16:19 +0000 (09:16 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 16 Mar 2015 09:16:19 +0000 (09:16 +0000)
cookbooks/munin/files/default/www/favicon.ico [new file with mode: 0644]
cookbooks/munin/recipes/server.rb
cookbooks/munin/templates/default/apache.erb

diff --git a/cookbooks/munin/files/default/www/favicon.ico b/cookbooks/munin/files/default/www/favicon.ico
new file mode 100644 (file)
index 0000000..975e1cb
Binary files /dev/null and b/cookbooks/munin/files/default/www/favicon.ico differ
index 8d9759960c21d85735e12637464ffbcaec2b81d4..4729f4321edc6c5981dec81989a332065dd932b5 100644 (file)
@@ -66,6 +66,17 @@ end
 apache_module "fcgid"
 apache_module "rewrite"
 
+remote_directory "/srv/munin.openstreetmap.org" do
+  source "www"
+  owner "root"
+  group "root"
+  mode 0755
+  files_owner "root"
+  files_group "root"
+  files_mode 0755
+  purge true
+end
+
 apache_site "munin.openstreetmap.org" do
   template "apache.erb"
 end
index d5a2267d61c47f0e966247b1249279048d4a0431..ecb4b4df4ee41b94e7496c701c6a962a73fc94b7 100644 (file)
@@ -8,17 +8,21 @@
        CustomLog /var/log/apache2/munin.openstreetmap.org-access.log combined
        ErrorLog /var/log/apache2/munin.openstreetmap.org-error.log
 
-       DocumentRoot /var/cache/munin/www
+       DocumentRoot /srv/munin.openstreetmap.org
+        Alias /static/favicon.ico /srv/munin.openstreetmap.org/favicon.ico
+       Alias /static/ /etc/munin/static/
        ScriptAlias /munin-cgi/ /usr/lib/munin/cgi/
 
        RewriteEngine on
        RewriteCond %{REQUEST_URI} !^/static/
-       RewriteCond %{REQUEST_URI} .html$ [or]
-       RewriteCond %{REQUEST_URI} =/
-       RewriteRule ^/(.*) /munin-cgi/munin-cgi-html/$1 [PT]
+       RewriteRule ^(/.*\.html)?$ /munin-cgi/munin-cgi-html/$1 [PT]
 </VirtualHost>
 
-<Directory /var/cache/munin/www>
+<Directory /srv/munin.openstreetmap.org>
+       Require all granted
+</Directory>
+
+<Directory /etc/munin/static>
        Require all granted
 </Directory>