From 10d2b563454e14f6d7e2e56d9656f4b3c6ebf33a Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Tue, 7 Dec 2010 19:44:19 +0100 Subject: [PATCH] lighttpd: Require HTTP auth for Brevidius git repositories. This uses simple matching on the querystring to select Brevidius-related repositories (which should be sufficient and perhaps have a few false positives as well) and uses a htpasswd file for the logins. --- etc/lighttpd/vhosts/stderr-nl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/etc/lighttpd/vhosts/stderr-nl b/etc/lighttpd/vhosts/stderr-nl index eb84556..fd12de4 100644 --- a/etc/lighttpd/vhosts/stderr-nl +++ b/etc/lighttpd/vhosts/stderr-nl @@ -19,6 +19,17 @@ $HTTP["host"] =~ ".stderr.nl$" { url.redirect += ("^/gitweb\?p=matthijs/projects/c.*ash\.git" => "/gitweb?p=matthijs/master-project/cλash.git") # Redirect / to gitweb url.redirect += ("^/$" => "/gitweb") + $HTTP["querystring"] =~ "/brevidius/" { + auth.backend = "htpasswd" + auth.backend.htpasswd.userfile = var.site-dir + "/conf/brevidius.user" + auth.require = ( + "/" => ( + "method" => "basic", + "realm" => "Brevidius", + "require" => "valid-user" + ) + ) + } } $HTTP["host"] =~ "hg.stderr.nl$" { -- 2.30.2