git.br0tkasten.de - apache vhost config

This commit is contained in:
Arne Baeumler 2016-05-14 20:52:39 +02:00
commit ff9df8324d

View File

@ -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>