]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/git/templates/default/apache.erb
Add https support for git.openstreetmap.org
[chef.git] / cookbooks / git / templates / default / apache.erb
index e9cb8b701328afad59232683855a3bf7947803ed..e9bebd2ea46002511e1bc6e51c7c7a741f0ba348 100644 (file)
@@ -2,6 +2,19 @@
 
 <VirtualHost *:80>
        ServerName <%= @name %>
+       ServerAdmin webmaster@openstreetmap.org
+
+       CustomLog /var/log/apache2/<%= @name %>-access.log combined
+       ErrorLog /var/log/apache2/<%= @name %>-error.log
+
+       RedirectPermanent / https://<%= @name %>/
+</VirtualHost>
+
+<VirtualHost *:443>
+       ServerName <%= @name %>
+       ServerAdmin webmaster@openstreetmap.org
+
+       SSLEngine on
 
        CustomLog /var/log/apache2/<%= @name %>-access.log combined
        ErrorLog /var/log/apache2/<%= @name %>-error.log
@@ -16,3 +29,7 @@
        RewriteRule ^/$ /gitweb.cgi%{REQUEST_URI} [L,PT]
        RewriteRule ^/(.*\.git/(?!/?(HEAD|info|objects|refs)).*)?$ /gitweb.cgi%{REQUEST_URI} [L,PT]
 </VirtualHost>
+
+<Directory <%= @directory %>>
+       Require all granted
+</Directory>