Bug #1312
closed$HTTP["remoteip"] compared to subnet does not work
Description
I use lighttpd as a personal webserver and on this server I also have a wiki. I want to block access to the wiki directory for all computers not belonging to my subnet. In lighttpd 1.4.14 and earlier the following worked:
$HTTP["remoteip"] != "192.168.0.0/8" { $HTTP["url"] =~ "^/wiki/" { url.access-deny = ( "" ) } }
But that does no longer work in lighttpd 1.4.16
If I rewrite the check to something like this it will work:
$HTTP["remoteip"] != "192.168.0.20" { $HTTP["url"] =~ "^/wiki/" { url.access-deny = ( "" ) } }
The operating system is Linux 2.6.21.3 running on an AMD64.
-- john.eckerdal
Updated by darix over 17 years ago
can you please test if http://zen.sh.nu/~darix/lighttpd-1.4.17.r1956.tar.gz
fixes your problem? this is a 1.4.17 release candidate.
Updated by jan over 17 years ago
Yep, this is a duplicate of #41
Close as duplicate when done.
Updated by Anonymous over 17 years ago
With the 1.4.17 release candidate it seems to work as expected.
-- john.eckerdal
Updated by darix over 17 years ago
- Status changed from New to Fixed
- Resolution set to fixed
closing as of last comment.
Updated by Anonymous about 17 years ago
- Status changed from Fixed to Need Feedback
- Resolution deleted (
fixed)
hy,
here in :
ii lighttpd 1.4.18-1+b1 A fast webserver with minimal memory footprint
the matching on subnets doesn's work
$HTTPremoteip =~ "192.168.0.0/24" {
alias.url += ( "/cgi-bin/" => "/usr/lib/cgi-bin/" )
$HTTP[[url]] =~ "/cgi-bin/" {
cgi.assign = ( ".pl" => "/usr/bin/perl" )
}
}
-- ruben
Updated by Anonymous about 17 years ago
hy,
still the same Problem in
ii lighttpd 1.4.19-1 A fast webserver with minimal memory footprint
all unmodified Debian packages.
-- ruben
Updated by stbuehler about 17 years ago
- Status changed from Need Feedback to Fixed
- Resolution set to invalid
You cannot check a subnet mask as a regular expression; use "==" or "!=" to match against subnets.
Also available in: Atom