]> git.openstreetmap.org Git - chef.git/commitdiff
Add munin web redirects to prometheus
authorGrant Slater <github@firefishy.com>
Wed, 13 Mar 2024 14:48:11 +0000 (14:48 +0000)
committerGrant <github@firefishy.com>
Wed, 13 Mar 2024 15:38:24 +0000 (15:38 +0000)
cookbooks/prometheus/recipes/server.rb
cookbooks/prometheus/templates/default/apache.erb

index 45b60f946ace102c3921b9b9bbe4f77fe973db04..4b9058c8eb5964dafd855879eafc272256891e35 100644 (file)
@@ -363,7 +363,7 @@ apache_module "proxy_http"
 apache_module "proxy_wstunnel"
 
 ssl_certificate "prometheus.openstreetmap.org" do
 apache_module "proxy_wstunnel"
 
 ssl_certificate "prometheus.openstreetmap.org" do
-  domains ["prometheus.openstreetmap.org", "prometheus.osm.org"]
+  domains ["prometheus.openstreetmap.org", "prometheus.osm.org", "munin.openstreetmap.org", "munin.osm.org"]
   notifies :reload, "service[apache2]"
 end
 
   notifies :reload, "service[apache2]"
 end
 
index af005314002b5ba7a96bc934850241f2ebb0c973..f03cf104966d7d52cbba1980bf1be759380b9bf7 100644 (file)
 <% end -%>
        </Location>
 </VirtualHost>
 <% end -%>
        </Location>
 </VirtualHost>
+
+<VirtualHost *:80>
+  ServerName munin.openstreetmap.org
+  ServerAlias munin.osm.org
+  ServerAdmin webmaster@openstreetmap.org
+
+  CustomLog /var/log/apache2/munin.openstreetmap.org-access.log combined_extended
+  ErrorLog /var/log/apache2/munin.openstreetmap.org-error.log
+
+  RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
+  Redirect permanent / https://prometheus.openstreetmap.org/
+</VirtualHost>
+
+<VirtualHost *:443>
+  ServerName munin.openstreetmap.org
+  ServerAlias munin.osm.org
+  ServerAdmin webmaster@openstreetmap.org
+
+  CustomLog /var/log/apache2/munin.openstreetmap.org-access.log combined_extended
+  ErrorLog /var/log/apache2/munin.openstreetmap.org-error.log
+
+  SSLEngine on
+  SSLCertificateFile /etc/ssl/certs/prometheus.openstreetmap.org.pem
+  SSLCertificateKeyFile /etc/ssl/private/prometheus.openstreetmap.org.key
+
+  Redirect permanent / https://prometheus.openstreetmap.org/
+</VirtualHost>