From ff9df8324d2a8dcefad12ff73de68a4db496e3ee Mon Sep 17 00:00:00 2001
From: Arne Baeumler <arne@br0tkasten.de>
Date: Sat, 14 May 2016 20:52:39 +0200
Subject: [PATCH] git.br0tkasten.de - apache vhost config

---
 .../etc/httpd/conf/vhosts/git.conf            | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 git.br0tkasten.de/etc/httpd/conf/vhosts/git.conf

diff --git a/git.br0tkasten.de/etc/httpd/conf/vhosts/git.conf b/git.br0tkasten.de/etc/httpd/conf/vhosts/git.conf
new file mode 100644
index 0000000..897811a
--- /dev/null
+++ b/git.br0tkasten.de/etc/httpd/conf/vhosts/git.conf
@@ -0,0 +1,33 @@
+<VirtualHost 37.221.196.144:80>
+	ServerName git.br0tkasten.de:80
+	DocumentRoot /var/www/git/htdocs
+	CustomLog /var/log/httpd/git/access.log combined
+	ErrorLog /var/log/httpd/git/error.log
+
+	SetEnv GITWEB_CONFIG /var/www/git/conf/gitweb.conf	
+	SetEnv GIT_PROJECT_ROOT /var/www/git/projects
+	SetEnv GIT_HTTP_EXPORT_ALL
+
+
+## Smart GIT http-backend https://www.kernel.org/pub/software/scm/git/docs/git-http-backend.html
+	ScriptAlias /projects/ /usr/lib/git-core/git-http-backend/
+	<LocationMatch "^/projects/.*/git-receive-pack$">
+		AuthType Basic
+		AuthName "git repository"
+		AuthUserFile /var/www/git/conf/htpasswd
+		Require valid-user
+	</LocationMatch>
+
+
+## gitweb config	
+	RewriteEngine On
+	RewriteRule ^/$  /gitweb.cgi
+	<Location />
+		Options ExecCGI FollowSymLinks SymLinksIfOwnerMatch
+		AddHandler cgi-script cgi
+		AllowOverride All
+		order allow,deny
+		Allow from all
+	</Location>
+
+</VirtualHost>