]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/switch2osm/templates/default/apache.erb
Switch 2 new switch2osm.org site
[chef.git] / cookbooks / switch2osm / templates / default / apache.erb
diff --git a/cookbooks/switch2osm/templates/default/apache.erb b/cookbooks/switch2osm/templates/default/apache.erb
new file mode 100644 (file)
index 0000000..2deada1
--- /dev/null
@@ -0,0 +1,36 @@
+# DO NOT EDIT - This file is being maintained by Chef
+
+<VirtualHost *:443>
+   ServerName <%= @name %>
+   ServerAlias www.switch2osm.org
+   ServerAlias switch2osm.com
+   ServerAlias www.switch2osm.com
+   ServerAdmin webmaster@openstreetmap.org
+
+   CustomLog /var/log/apache2/<%= @name %>-access.log combined
+   ErrorLog /var/log/apache2/<%= @name %>-error.log
+
+   SSLEngine on
+   SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
+   SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
+
+   DocumentRoot <%= @directory %>
+</VirtualHost>
+
+<VirtualHost *:80>
+   ServerName <%= @name %>
+   ServerAlias www.switch2osm.org
+   ServerAlias switch2osm.com
+   ServerAlias www.switch2osm.com
+   ServerAdmin webmaster@openstreetmap.org
+
+   CustomLog /var/log/apache2/<%= @name %>-access.log combined
+   ErrorLog /var/log/apache2/<%= @name %>-error.log
+
+   RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
+   RedirectPermanent / https://<%= @name %>/
+</VirtualHost>
+
+<Directory <%= @directory %>>
+   Require all granted
+</Directory>