summaryrefslogtreecommitdiff
path: root/tests/lighttpd.conf
diff options
context:
space:
mode:
authorJan Kneschke <jan@kneschke.de>2005-09-16 12:44:29 +0000
committerJan Kneschke <jan@kneschke.de>2005-09-16 12:44:29 +0000
commite2cf5d3094d5fe655bb03d477bfcff25dfd2e453 (patch)
tree4c0d0e9853a4e03128d8753d3b14cd44d57506fe /tests/lighttpd.conf
parentbe5f187d0ff76716befd069396e5f234293eb5af (diff)
downloadlighttpd-git-e2cf5d3094d5fe655bb03d477bfcff25dfd2e453.tar.gz
tests for htpasswd + md5 and referer matching in conditionals
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@711 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'tests/lighttpd.conf')
-rw-r--r--tests/lighttpd.conf31
1 files changed, 15 insertions, 16 deletions
diff --git a/tests/lighttpd.conf b/tests/lighttpd.conf
index 576fbd45..a435e8f0 100644
--- a/tests/lighttpd.conf
+++ b/tests/lighttpd.conf
@@ -85,34 +85,27 @@ userdir.path = "/"
ssl.engine = "disable"
ssl.pemfile = "server.pem"
+$HTTP["host"] == "auth-htpasswd.example.org" {
+ auth.backend = "htpasswd"
+}
+
auth.backend = "plain"
auth.backend.plain.userfile = "@SRCDIR@/tmp/lighttpd/lighttpd.user"
-auth.backend.plain.groupfile = "lighttpd.group"
-auth.backend.ldap.hostname = "localhost"
-auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
-auth.backend.ldap.filter = "(uid=$)"
+auth.backend.htpasswd.userfile = "@SRCDIR@/tmp/lighttpd/lighttpd.htpasswd"
+
auth.require = ( "/server-status" =>
(
"method" => "digest",
"realm" => "download archiv",
-# "require" => ("group=www", "user=jan", "host=192.168.2.10")
"require" => "group=www|user=jan|host=192.168.2.10"
),
- "/auth.php" =>
- (
- "method" => "basic",
- "realm" => "download archiv",
-# "require" => ("group=www", "user=jan", "host=192.168.2.10")
- "require" => "user=jan"
- ),
"/server-config" =>
(
"method" => "basic",
"realm" => "download archiv",
-# "require" => ("group=www", "user=jan", "user=weigon", "host=192.168.2.10")
- "require" => "group=www|user=jan|host=192.168.2.10"
+ "require" => "valid-user"
)
)
@@ -175,7 +168,13 @@ $HTTP["remoteip"] =~ "(127.0.0.1)" {
}
# deny access for all image stealers
-$HTTP["referer"] !~ "^($|http://www\.example\.org)" {
- url.access-deny = ( ".jpg", ".jpeg", ".png" )
+$HTTP["host"] == "referer.example.org" {
+ $HTTP["referer"] !~ "^($|http://referer\.example\.org)" {
+ url.access-deny = ( ".png" )
+ }
+}
+
+$HTTP["referer"] !~ "^($|http://referer\.example\.org)" {
+ url.access-deny = ( ".jpg" )
}