4 LogFormat "%h %l %u %t \"%r\" %>s %b" common
5 CustomLog access.log common
7 <IfModule !mod_log_config.c>
8 LoadModule log_config_module modules/mod_log_config.so
10 <IfModule !mod_alias.c>
11 LoadModule alias_module modules/mod_alias.so
14 LoadModule cgi_module modules/mod_cgi.so
17 LoadModule env_module modules/mod_env.so
19 <IfModule !mod_rewrite.c>
20 LoadModule rewrite_module modules/mod_rewrite.so
22 <IfModule !mod_version.c>
23 LoadModule version_module modules/mod_version.so
25 <IfModule !mod_headers.c>
26 LoadModule headers_module modules/mod_headers.so
28 <IfModule !mod_setenvif.c>
29 LoadModule setenvif_module modules/mod_setenvif.so
33 LoadModule http2_module modules/mod_http2.so
37 <IfModule !mod_auth_basic.c>
38 LoadModule auth_basic_module modules/mod_auth_basic.so
40 <IfModule !mod_authn_file.c>
41 LoadModule authn_file_module modules/mod_authn_file.so
43 <IfModule !mod_authz_user.c>
44 LoadModule authz_user_module modules/mod_authz_user.so
46 <IfModule !mod_authz_host.c>
47 LoadModule authz_host_module modules/mod_authz_host.so
51 <IfModule !mod_proxy.c>
52 LoadModule proxy_module modules/mod_proxy.so
54 <IfModule !mod_proxy_http.c>
55 LoadModule proxy_http_module modules/mod_proxy_http.so
61 AuthUserFile proxy-passwd
66 <IfModule !mod_authn_core.c>
67 LoadModule authn_core_module modules/mod_authn_core.so
69 <IfModule !mod_authz_core.c>
70 LoadModule authz_core_module modules/mod_authz_core.so
72 <IfModule !mod_access_compat.c>
73 LoadModule access_compat_module modules/mod_access_compat.so
75 <IfModule !mod_unixd.c>
76 LoadModule unixd_module modules/mod_unixd.so
80 <IfModule !mod_mpm_event.c>
81 LoadModule mpm_event_module modules/mod_mpm_event.so
85 <IfModule !mod_mpm_prefork.c>
86 LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
91 PassEnv GIT_VALGRIND_OPTIONS
96 PassEnv GIT_CONFIG_NOSYSTEM
97 PassEnv GIT_TEST_SIDEBAND_ALL
102 Alias /auth/dumb/ www/auth/dumb/
104 SetEnv PERL_PATH ${PERL_PATH}
106 <LocationMatch /smart/>
107 SetEnv GIT_EXEC_PATH ${GIT_EXEC_PATH}
108 SetEnv GIT_HTTP_EXPORT_ALL
110 <LocationMatch /smart_noexport/>
111 SetEnv GIT_EXEC_PATH ${GIT_EXEC_PATH}
113 <LocationMatch /smart_custom_env/>
114 SetEnv GIT_EXEC_PATH ${GIT_EXEC_PATH}
115 SetEnv GIT_HTTP_EXPORT_ALL
116 SetEnv GIT_COMMITTER_NAME "Custom User"
117 SetEnv GIT_COMMITTER_EMAIL custom@example.com
119 <LocationMatch /smart_namespace/>
120 SetEnv GIT_EXEC_PATH ${GIT_EXEC_PATH}
121 SetEnv GIT_HTTP_EXPORT_ALL
122 SetEnv GIT_NAMESPACE ns
124 <LocationMatch /smart_cookies/>
125 SetEnv GIT_EXEC_PATH ${GIT_EXEC_PATH}
126 SetEnv GIT_HTTP_EXPORT_ALL
127 Header set Set-Cookie name=value
129 <LocationMatch /smart_headers/>
131 Require expr %{HTTP:x-magic-one} == 'abra'
132 Require expr %{HTTP:x-magic-two} == 'cadabra'
134 SetEnv GIT_EXEC_PATH ${GIT_EXEC_PATH}
135 SetEnv GIT_HTTP_EXPORT_ALL
137 <LocationMatch /one_time_perl/>
138 SetEnv GIT_EXEC_PATH ${GIT_EXEC_PATH}
139 SetEnv GIT_HTTP_EXPORT_ALL
141 <LocationMatch /smart_v0/>
142 SetEnv GIT_EXEC_PATH ${GIT_EXEC_PATH}
143 SetEnv GIT_HTTP_EXPORT_ALL
146 <LocationMatch /custom_auth/>
147 SetEnv GIT_EXEC_PATH ${GIT_EXEC_PATH}
148 SetEnv GIT_HTTP_EXPORT_ALL
149 <IfDefine USE_CGIPASSAUTH>
153 ScriptAlias /smart/incomplete_length/git-upload-pack incomplete-length-upload-pack-v2-http.sh/
154 ScriptAlias /smart/incomplete_body/git-upload-pack incomplete-body-upload-pack-v2-http.sh/
155 ScriptAlias /smart/no_report/git-receive-pack error-no-report.sh/
156 ScriptAliasMatch /error_git_upload_pack/(.*)/git-upload-pack error.sh/
157 ScriptAliasMatch /smart_*[^/]*/(.*) ${GIT_EXEC_PATH}/git-http-backend/$1
158 ScriptAlias /broken_smart/ broken-smart-http.sh/
159 ScriptAlias /error_smart/ error-smart-http.sh/
160 ScriptAlias /error/ error.sh/
161 ScriptAliasMatch /one_time_perl/(.*) apply-one-time-perl.sh/$1
162 ScriptAliasMatch /custom_auth/(.*) nph-custom-auth.sh/$1
163 <Directory ${GIT_EXEC_PATH}>
164 Options FollowSymlinks
166 <Files incomplete-length-upload-pack-v2-http.sh>
169 <Files incomplete-body-upload-pack-v2-http.sh>
172 <Files error-no-report.sh>
175 <Files broken-smart-http.sh>
178 <Files error-smart-http.sh>
184 <Files apply-one-time-perl.sh>
187 <Files ${GIT_EXEC_PATH}/git-http-backend>
192 RewriteRule ^/dumb-redir/(.*)$ /dumb/$1 [R=301]
193 RewriteRule ^/smart-redir-perm/(.*)$ /smart/$1 [R=301]
194 RewriteRule ^/smart-redir-temp/(.*)$ /smart/$1 [R=302]
195 RewriteRule ^/smart-redir-auth/(.*)$ /auth/smart/$1 [R=301]
196 RewriteRule ^/smart-redir-limited/(.*)/info/refs$ /smart/$1/info/refs [R=301]
197 RewriteRule ^/ftp-redir/(.*)$ ftp://localhost:1000/$1 [R=302]
199 RewriteRule ^/loop-redir/x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-(.*) /$1 [R=302]
200 RewriteRule ^/loop-redir/(.*)$ /loop-redir/x-$1 [R=302]
202 # redir-to/502/x?y -> really-redir-to?path=502/x&qs=y which returns 502
203 # redir-to/x?y -> really-redir-to?path=x&qs=y -> x?y
204 RewriteCond %{QUERY_STRING} ^(.*)$
205 RewriteRule ^/redir-to/(.*)$ /really-redir-to?path=$1&qs=%1 [R=302]
206 RewriteCond %{QUERY_STRING} ^path=502/(.*)&qs=(.*)$
207 RewriteRule ^/really-redir-to$ - [R=502,L]
208 RewriteCond %{QUERY_STRING} ^path=(.*)&qs=(.*)$
209 RewriteRule ^/really-redir-to$ /%1?%2 [R=302]
211 # The first rule issues a client-side redirect to something
212 # that _doesn't_ look like a git repo. The second rule is a
213 # server-side rewrite, so that it turns out the odd-looking
214 # thing _is_ a git repo. The "[PT]" tells Apache to match
215 # the usual ScriptAlias rules for /smart.
216 RewriteRule ^/insane-redir/(.*)$ /intern-redir/$1/foo [R=301]
217 RewriteRule ^/intern-redir/(.*)/foo$ /smart/$1 [PT]
219 # Serve info/refs internally without redirecting, but
220 # issue a redirect for any object requests.
221 RewriteRule ^/redir-objects/(.*/info/refs)$ /dumb/$1 [PT]
222 RewriteRule ^/redir-objects/(.*/objects/.*)$ /dumb/$1 [R=301]
225 LoadModule ssl_module modules/mod_ssl.so
227 SSLCertificateFile httpd.pem
228 SSLCertificateKeyFile httpd.pem
229 SSLRandomSeed startup file:/dev/urandom 512
230 SSLRandomSeed connect file:/dev/urandom 512
242 <LocationMatch "^/auth-push/.*/git-receive-pack$">
249 <LocationMatch "^/auth-fetch/.*/git-upload-pack$">
256 RewriteCond %{QUERY_STRING} service=git-receive-pack [OR]
257 RewriteCond %{REQUEST_URI} /git-receive-pack$
258 RewriteRule ^/half-auth-complete/ - [E=AUTHREQUIRED:yes]
260 <Location /half-auth-complete/>
262 Deny from env=AUTHREQUIRED
265 AuthName "Git Access"
272 LoadModule dav_module modules/mod_dav.so
273 LoadModule dav_fs_module modules/mod_dav_fs.so
279 <Location /auth/dumb>
285 LoadModule dav_svn_module modules/mod_dav_svn.so
287 <Location /${LIB_HTTPD_SVN}>
289 SVNPath "${LIB_HTTPD_SVNPATH}"