From 529cd5077e3d76c1d5b612bc146ab174d7143c30 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 18 Sep 2014 12:47:46 -0300 Subject: Squashed 'puppet/' content from commit bb2eae6 git-subtree-dir: puppet git-subtree-split: bb2eae6f3a1f44fef0a05000d79c298442fa24c7 --- templates/apache/vhosts/git.erb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 templates/apache/vhosts/git.erb (limited to 'templates/apache/vhosts/git.erb') diff --git a/templates/apache/vhosts/git.erb b/templates/apache/vhosts/git.erb new file mode 100644 index 0000000..25aecd1 --- /dev/null +++ b/templates/apache/vhosts/git.erb @@ -0,0 +1,20 @@ +# begin vhost for git + + # Recipe based on http://josephspiros.com/2009/07/26/configuring-gitweb-for-apache-on-debian + + ServerName git.<%= domain %> + SetEnv GITWEB_CONFIG /etc/gitweb.conf + HeaderName HEADER + DocumentRoot /var/git/repositories + Alias /gitweb.css /usr/share/gitweb/gitweb.css + Alias /git-favicon.png /usr/share/gitweb/git-favicon.png + Alias /git-logo.png /usr/share/gitweb/git-logo.png + + ScriptAlias /gitweb /usr/lib/cgi-bin/gitweb.cgi + RewriteEngine on + + # Rewrite all other paths that aren't git repo internals to gitweb + RewriteRule ^/$ /gitweb [PT] + RewriteRule ^/(.*\.git/(?!/?(HEAD|info|objects|refs)).*)?$ /gitweb%{REQUEST_URI} [L,PT] + +# end vhost for git -- cgit v1.2.3