From: Tom Hughes Date: Mon, 16 Mar 2015 09:16:19 +0000 (+0000) Subject: Tidy up munin www config X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/60ef68d5a680e8198874299a1685cb72430b9b49?ds=inline Tidy up munin www config --- diff --git a/cookbooks/munin/files/default/www/favicon.ico b/cookbooks/munin/files/default/www/favicon.ico new file mode 100644 index 000000000..975e1cb0d Binary files /dev/null and b/cookbooks/munin/files/default/www/favicon.ico differ diff --git a/cookbooks/munin/recipes/server.rb b/cookbooks/munin/recipes/server.rb index 8d9759960..4729f4321 100644 --- a/cookbooks/munin/recipes/server.rb +++ b/cookbooks/munin/recipes/server.rb @@ -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 diff --git a/cookbooks/munin/templates/default/apache.erb b/cookbooks/munin/templates/default/apache.erb index d5a2267d6..ecb4b4df4 100644 --- a/cookbooks/munin/templates/default/apache.erb +++ b/cookbooks/munin/templates/default/apache.erb @@ -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] - + + Require all granted + + + Require all granted