From 287207a3488c0fe779458537378d7fc1474813db Mon Sep 17 00:00:00 2001 From: James Meyer Date: Mon, 14 Jan 2013 14:42:49 -0600 Subject: lighttpd:: enforce password across the entire site with the following exceptions: 1) access from localhost/127.0.0.1 2) port 1337 3) the file failed_func_hosts refs #896 --- abs/core/lighttpd/auth-inc.conf | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/abs/core/lighttpd/auth-inc.conf b/abs/core/lighttpd/auth-inc.conf index 21c4c55..6fb1a9d 100644 --- a/abs/core/lighttpd/auth-inc.conf +++ b/abs/core/lighttpd/auth-inc.conf @@ -1,12 +1,15 @@ -auth.backend = "plain" -auth.backend.plain.userfile = "/etc/lighttpd/lighttpd.user" - - -auth.require = ( "/mythweb" => - ( - "method" => "basic", - "realm" => "MythWeb", - "require" => "valid-user" - ) - ) - +$SERVER["socket"] != ":1337" { + $HTTP["remoteip"] != "127.0.0.1" { + $HTTP["url"] !~ "^/failed_func.hosts"{ + auth.backend = "plain" + auth.backend.plain.userfile = "/etc/lighttpd/lighttpd.user" + auth.require = ( "" => + ( + "method" => "basic", + "realm" => "LinHES Central Server", + "require" => "valid-user" + ) + ) + } + } +} -- cgit v0.12