]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/chef/templates/default/apache.erb
Enable https access to private git repositories
[chef.git] / cookbooks / chef / templates / default / apache.erb
index f758e983553eeb8380677f7577018854b3fd7797..4f57bba7de7ca2d6844cba5a076082803216fb9f 100644 (file)
@@ -8,6 +8,7 @@
        CustomLog /var/log/apache2/chef.openstreetmap.org-access.log combined
        ErrorLog /var/log/apache2/chef.openstreetmap.org-error.log
 
+       RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
        Redirect permanent / https://chef.openstreetmap.org/
 </VirtualHost>
 
        ServerName chef.openstreetmap.org
        ServerAdmin webmaster@openstreetmap.org
 
-       SSLEngine on
-       SSLProtocol all -SSLv2
-       SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
-       SSLCertificateFile /etc/ssl/certs/openstreetmap.pem
-       SSLCertificateKeyFile /etc/ssl/private/openstreetmap.key
-
        CustomLog /var/log/apache2/chef.openstreetmap.org-access.log combined
        ErrorLog /var/log/apache2/chef.openstreetmap.org-error.log
 
+       DocumentRoot /var/lib/git
+
+       SSLEngine on
        SSLProxyEngine on
+       SSLCertificateFile /etc/ssl/certs/chef.openstreetmap.org.pem
+       SSLCertificateKeyFile /etc/ssl/private/chef.openstreetmap.org.key
 
-       ProxyPass / https://127.0.0.1:4443/
+       ProxyPassMatch ^/.*\.git/ !
+       ProxyPass / https://<%= node[:fqdn] %>:4443/
+       ProxyPreserveHost on
 </VirtualHost>
+
+<Directory /var/lib/git>
+       Require ip <%= @git_allowed.sort.join(" ") %>
+</Directory>