]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/taginfo/templates/default/apache.erb
Remove cmd line options on osmium call not needed for current version.
[chef.git] / cookbooks / taginfo / templates / default / apache.erb
index 897cfcd215e7aa03ced80f51ac76ed3540cafb3c..3ae9fed71228623edd1191b0768484b51766bb27 100644 (file)
@@ -1,14 +1,12 @@
 # DO NOT EDIT - This file is being maintained by Chef
 
-<% [80, 443].each do |port| -%>
-
-<VirtualHost *:<%= port %>>
+<VirtualHost *:443>
         ServerName <%= @name %>
         ServerAdmin webmaster@openstreetmap.org
-<% if port == 443 -%>
 
         SSLEngine on
-<% end -%>
+        SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
+        SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
 
         CustomLog /var/log/apache2/<%= @name %>-access.log combined
         ErrorLog /var/log/apache2/<%= @name %>-error.log
         CacheEnable disk /api
         CacheEnable disk /embed
         CacheStaleOnError off
+
+        <Location /api>
+                Header setifempty Access-Control-Allow-Origin *
+        </Location>
+</VirtualHost>
+
+<VirtualHost *:80>
+        ServerName <%= @name %>
+        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>
-<% end -%>
 
 <Directory <%= @directory %>>
         Require all granted