]> git.openstreetmap.org Git - chef.git/commitdiff
Add static entry page for stateofthemap.org
authorTom Hughes <tom@compton.nu>
Sat, 7 Nov 2015 14:57:28 +0000 (14:57 +0000)
committerTom Hughes <tom@compton.nu>
Sat, 7 Nov 2015 14:57:28 +0000 (14:57 +0000)
cookbooks/stateofthemap/recipes/default.rb
cookbooks/stateofthemap/templates/default/apache.erb [new file with mode: 0644]

index fae6b442d44d74680a1d6d9d590574e917712373..40a29c2984edc564d9b9b33959603b0708beaa4c 100644 (file)
@@ -21,6 +21,19 @@ include_recipe "wordpress"
 
 passwords = data_bag_item("stateofthemap", "passwords")
 
+git "/srv/stateofthemap.org" do
+  action :sync
+  repository "git://git.openstreetmap.org/stateofthemap.git"
+  revision "chooser"
+  user "root"
+  group "root"
+end
+
+apache_site "stateofthemap.org" do
+  template "apache.erb"
+  directory "/srv/stateofthemap.org"
+end
+
 directory "/srv/2007.stateofthemap.org" do
   owner "wordpress"
   group "wordpress"
diff --git a/cookbooks/stateofthemap/templates/default/apache.erb b/cookbooks/stateofthemap/templates/default/apache.erb
new file mode 100644 (file)
index 0000000..cc9005f
--- /dev/null
@@ -0,0 +1,40 @@
+# DO NOT EDIT - This file is being maintained by Chef
+
+<VirtualHost *:80>
+        ServerName stateofthemap.org
+        ServerAlias stateofthemap.com
+        ServerAlias www.stateofthemap.org
+        ServerAlias www.stateofthemap.com
+        ServerAdmin webmaster@openstreetmap.org
+
+        CustomLog /var/log/apache2/stateofthemap.org-access.log combined
+        ErrorLog /var/log/apache2/stateofthemap.org-error.log
+
+        RedirectPermanent / https://stateofthemap.org/
+</VirtualHost>
+
+<VirtualHost *:443>
+        ServerName stateofthemap.com
+        ServerAlias www.stateofthemap.org
+        ServerAlias www.stateofthemap.com
+        ServerAdmin webmaster@openstreetmap.org
+
+        CustomLog /var/log/apache2/stateofthemap.org-access.log combined
+        ErrorLog /var/log/apache2/stateofthemap.org-error.log
+
+        RedirectPermanent / https://stateofthemap.org/
+</VirtualHost>
+
+<VirtualHost *:443>
+        ServerName stateofthemap.org
+        ServerAdmin webmaster@openstreetmap.org
+
+        CustomLog /var/log/apache2/stateofthemap.org-access.log combined
+        ErrorLog /var/log/apache2/stateofthemap.org-error.log
+
+        DocumentRoot /srv/stateofthemap.org/html
+</VirtualHost>
+
+<Directory /srv/stateofthemap.org/html>
+        Require all granted
+</Directory>