Merge branch 'patch-1' into 'master'
[xonotic/xonotic.git] / misc / infrastructure / git-vhost.conf
1 <VirtualHost *:80>
2         ServerName de.git.xonotic.org
3         ServerAlias nl.git.xonotic.org
4         ServerAlias us.git.xonotic.org
5         ServerAlias git.xonotic.org
6         ServerAdmin divVerent@xonotic.org
7
8         SetEnv GIT_PROJECT_ROOT /var/cache/git
9
10         AliasMatch ^/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$          /var/cache/git/$1
11         AliasMatch ^/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$ /var/cache/git/$1
12         ScriptAliasMatch \
13                "(?x)^/(.*/(HEAD | \
14                                info/refs | \
15                                objects/info/[^/]+ | \
16                                git-(upload|receive)-pack))$" \
17                /usr/lib/git-core/git-http-backend/$1
18
19         DocumentRoot /usr/share/gitweb
20         Alias /gitweb /usr/share/gitweb/static
21         DirectoryIndex gitweb.cgi
22
23         <Directory /usr/lib/git-core>
24                 <Files git-http-backend>
25                         Allow from all
26                         Deny from none
27                         Order Allow,Deny
28
29                         Options +ExecCGI
30                         SetHandler cgi-script
31                 </Files>
32         </Directory>
33
34         <Directory /var/cache/git>
35                 Allow from all
36                 Deny from none
37                 Order Allow,Deny
38
39                 Options Indexes
40         </Directory>
41
42         <Directory /usr/share/gitweb>
43                 Allow from all
44                 Deny from none
45                 Order Allow,Deny
46
47                 Options Indexes
48                 <Files gitweb.cgi>
49                         Options +ExecCGI
50                         SetHandler cgi-script
51                 </Files>
52         </Directory>
53 </VirtualHost>