]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/git/templates/default/apache.erb
Add a load more cookbooks
[chef.git] / cookbooks / git / templates / default / apache.erb
diff --git a/cookbooks/git/templates/default/apache.erb b/cookbooks/git/templates/default/apache.erb
new file mode 100644 (file)
index 0000000..e9cb8b7
--- /dev/null
@@ -0,0 +1,18 @@
+# DO NOT EDIT - This file is being maintained by Chef
+
+<VirtualHost *:80>
+       ServerName <%= @name %>
+
+       CustomLog /var/log/apache2/<%= @name %>-access.log combined
+       ErrorLog /var/log/apache2/<%= @name %>-error.log
+
+       DocumentRoot <%= @directory %>
+       HeaderName HEADER
+       Alias /gitweb /usr/share/gitweb
+       Alias /git /var/cache/git
+       ScriptAlias /gitweb.cgi /usr/lib/cgi-bin/gitweb.cgi
+
+       RewriteEngine On
+       RewriteRule ^/$ /gitweb.cgi%{REQUEST_URI} [L,PT]
+       RewriteRule ^/(.*\.git/(?!/?(HEAD|info|objects|refs)).*)?$ /gitweb.cgi%{REQUEST_URI} [L,PT]
+</VirtualHost>