From afc3489f2735518178b6338bd0d47e438fbaf36e Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sat, 7 Nov 2015 14:57:28 +0000 Subject: [PATCH] Add static entry page for stateofthemap.org --- cookbooks/stateofthemap/recipes/default.rb | 13 ++++++ .../templates/default/apache.erb | 40 +++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 cookbooks/stateofthemap/templates/default/apache.erb diff --git a/cookbooks/stateofthemap/recipes/default.rb b/cookbooks/stateofthemap/recipes/default.rb index fae6b442d..40a29c298 100644 --- a/cookbooks/stateofthemap/recipes/default.rb +++ b/cookbooks/stateofthemap/recipes/default.rb @@ -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 index 000000000..cc9005f9a --- /dev/null +++ b/cookbooks/stateofthemap/templates/default/apache.erb @@ -0,0 +1,40 @@ +# DO NOT EDIT - This file is being maintained by Chef + + + 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/ + + + + 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/ + + + + 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 + + + + Require all granted + -- 2.43.2