summaryrefslogtreecommitdiff
path: root/t/lib-httpd
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-04-22 01:40:09 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-04-22 01:40:09 (GMT)
commitc6c4d616739b531b5689b78fbcb2c89d14e70a4f (patch)
tree22c54caba1de01dd61d47603a35d98a6cc9d02a5 /t/lib-httpd
parent62ff746bef4db9bf8e6b29a593150e2b4adae039 (diff)
parentb0808819e5806f5ff01ffcc34db2796d180ad0d9 (diff)
downloadgit-c6c4d616739b531b5689b78fbcb2c89d14e70a4f.zip
git-c6c4d616739b531b5689b78fbcb2c89d14e70a4f.tar.gz
git-c6c4d616739b531b5689b78fbcb2c89d14e70a4f.tar.bz2
Merge branch 'jk/doc-http-backend'
Improve documentation to illustrate "push authenticated, fetch anonymous" configuration for smart HTTP servers. * jk/doc-http-backend: doc/http-backend: match query-string in apache half-auth example doc/http-backend: give some lighttpd config examples doc/http-backend: clarify "half-auth" repo configuration
Diffstat (limited to 't/lib-httpd')
-rw-r--r--t/lib-httpd/apache.conf18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/lib-httpd/apache.conf b/t/lib-httpd/apache.conf
index ad85537..b5bce45 100644
--- a/t/lib-httpd/apache.conf
+++ b/t/lib-httpd/apache.conf
@@ -40,6 +40,9 @@ ErrorLog error.log
<IfModule !mod_authz_user.c>
LoadModule authz_user_module modules/mod_authz_user.so
</IfModule>
+<IfModule !mod_authz_host.c>
+ LoadModule authz_host_module modules/mod_authz_host.so
+</IfModule>
</IfVersion>
PassEnv GIT_VALGRIND
@@ -115,6 +118,21 @@ SSLEngine On
Require valid-user
</LocationMatch>
+RewriteCond %{QUERY_STRING} service=git-receive-pack [OR]
+RewriteCond %{REQUEST_URI} /git-receive-pack$
+RewriteRule ^/half-auth-complete/ - [E=AUTHREQUIRED:yes]
+
+<Location /half-auth-complete/>
+ Order Deny,Allow
+ Deny from env=AUTHREQUIRED
+
+ AuthType Basic
+ AuthName "Git Access"
+ AuthUserFile passwd
+ Require valid-user
+ Satisfy Any
+</Location>
+
<IfDefine DAV>
LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so