]> git.openstreetmap.org Git - chef.git/commitdiff
Serve private git repositories with git-http-backend
authorTom Hughes <tom@compton.nu>
Thu, 21 Jun 2018 23:32:31 +0000 (00:32 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 21 Jun 2018 23:32:31 +0000 (00:32 +0100)
cookbooks/chef/templates/default/apache.erb

index 4f57bba7de7ca2d6844cba5a076082803216fb9f..706ab5eadc9f9d754d2df3f9619cc094f071b728 100644 (file)
@@ -19,8 +19,6 @@
        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
        ProxyPassMatch ^/.*\.git/ !
        ProxyPass / https://<%= node[:fqdn] %>:4443/
        ProxyPreserveHost on
+
+       SetEnv GIT_PROJECT_ROOT /var/lib/git
+       SetEnv GIT_HTTP_EXPORT_ALL
+       ScriptAlias / /usr/lib/git-core/git-http-backend/
 </VirtualHost>
 
-<Directory /var/lib/git>
+<Directory /usr/lib/git-core>
+       Options ExecCGI
        Require ip <%= @git_allowed.sort.join(" ") %>
 </Directory>