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