1ServerName dummy
2LockFile accept.lock
3PidFile httpd.pid
4DocumentRoot www
5LogFormat "%h %l %u %t \"%r\" %>s %b" common
6CustomLog access.log common
7ErrorLog error.log
8<IfModule !mod_log_config.c>
9 LoadModule log_config_module modules/mod_log_config.so
10</IfModule>
11<IfModule !mod_alias.c>
12 LoadModule alias_module modules/mod_alias.so
13</IfModule>
14<IfModule !mod_cgi.c>
15 LoadModule cgi_module modules/mod_cgi.so
16</IfModule>
17<IfModule !mod_env.c>
18 LoadModule env_module modules/mod_env.so
19</IfModule>
20<IfModule !mod_rewrite.c>
21 LoadModule rewrite_module modules/mod_rewrite.so
22</IFModule>
23<IfModule !mod_version.c>
24 LoadModule version_module modules/mod_version.so
25</IfModule>
26
27<IfVersion < 2.1>
28<IfModule !mod_auth.c>
29 LoadModule auth_module modules/mod_auth.so
30</IfModule>
31</IfVersion>
32
33<IfVersion >= 2.1>
34<IfModule !mod_auth_basic.c>
35 LoadModule auth_basic_module modules/mod_auth_basic.so
36</IfModule>
37<IfModule !mod_authn_file.c>
38 LoadModule authn_file_module modules/mod_authn_file.so
39</IfModule>
40<IfModule !mod_authz_user.c>
41 LoadModule authz_user_module modules/mod_authz_user.so
42</IfModule>
43<IfModule !mod_authz_host.c>
44 LoadModule authz_host_module modules/mod_authz_host.so
45</IfModule>
46</IfVersion>
47
48PassEnv GIT_VALGRIND
49PassEnv GIT_VALGRIND_OPTIONS
50
51Alias /dumb/ www/
52Alias /auth/dumb/ www/auth/dumb/
53
54<LocationMatch /smart/>
55 SetEnv GIT_EXEC_PATH ${GIT_EXEC_PATH}
56 SetEnv GIT_HTTP_EXPORT_ALL
57</LocationMatch>
58<LocationMatch /smart_noexport/>
59 SetEnv GIT_EXEC_PATH ${GIT_EXEC_PATH}
60</LocationMatch>
61<LocationMatch /smart_custom_env/>
62 SetEnv GIT_EXEC_PATH ${GIT_EXEC_PATH}
63 SetEnv GIT_HTTP_EXPORT_ALL
64 SetEnv GIT_COMMITTER_NAME "Custom User"
65 SetEnv GIT_COMMITTER_EMAIL custom@example.com
66</LocationMatch>
67ScriptAliasMatch /smart_*[^/]*/(.*) ${GIT_EXEC_PATH}/git-http-backend/$1
68ScriptAlias /broken_smart/ broken-smart-http.sh/
69<Directory ${GIT_EXEC_PATH}>
70 Options FollowSymlinks
71</Directory>
72<Files broken-smart-http.sh>
73 Options ExecCGI
74</Files>
75<Files ${GIT_EXEC_PATH}/git-http-backend>
76 Options ExecCGI
77</Files>
78
79RewriteEngine on
80RewriteRule ^/smart-redir-perm/(.*)$ /smart/$1 [R=301]
81RewriteRule ^/smart-redir-temp/(.*)$ /smart/$1 [R=302]
82
83<IfDefine SSL>
84LoadModule ssl_module modules/mod_ssl.so
85
86SSLCertificateFile httpd.pem
87SSLCertificateKeyFile httpd.pem
88SSLRandomSeed startup file:/dev/urandom 512
89SSLRandomSeed connect file:/dev/urandom 512
90SSLSessionCache none
91SSLMutex file:ssl_mutex
92SSLEngine On
93</IfDefine>
94
95<Location /auth/>
96 AuthType Basic
97 AuthName "git-auth"
98 AuthUserFile passwd
99 Require valid-user
100</Location>
101
102<LocationMatch "^/auth-push/.*/git-receive-pack$">
103 AuthType Basic
104 AuthName "git-auth"
105 AuthUserFile passwd
106 Require valid-user
107</LocationMatch>
108
109<LocationMatch "^/auth-fetch/.*/git-upload-pack$">
110 AuthType Basic
111 AuthName "git-auth"
112 AuthUserFile passwd
113 Require valid-user
114</LocationMatch>
115
116RewriteCond %{QUERY_STRING} service=git-receive-pack [OR]
117RewriteCond %{REQUEST_URI} /git-receive-pack$
118RewriteRule ^/half-auth-complete/ - [E=AUTHREQUIRED:yes]
119
120<Location /half-auth-complete/>
121 Order Deny,Allow
122 Deny from env=AUTHREQUIRED
123
124 AuthType Basic
125 AuthName "Git Access"
126 AuthUserFile passwd
127 Require valid-user
128 Satisfy Any
129</Location>
130
131<IfDefine DAV>
132 LoadModule dav_module modules/mod_dav.so
133 LoadModule dav_fs_module modules/mod_dav_fs.so
134
135 DAVLockDB DAVLock
136 <Location /dumb/>
137 Dav on
138 </Location>
139 <Location /auth/dumb>
140 Dav on
141 </Location>
142</IfDefine>
143
144<IfDefine SVN>
145 LoadModule dav_svn_module modules/mod_dav_svn.so
146
147 <Location /svn>
148 DAV svn
149 SVNPath svnrepo
150 </Location>
151</IfDefine>