lighttpd forum lighty > Order of (nested) Conditionals (remoteip <-> host)

Posted by Bruno Baketaric (Guest)
on 02.05.2008 11:15
Hi all,

we used to write this in lighty's config:
<pre>
var.allowedip = "192.168.10.10"
$HTTP["remoteip"] =~ var.allowedip {
    $HTTP["host"] == "vhost1.srv.tld" {
        ...vserver-config...
    }
    $HTTP["host"] == "vhost2.srv.tld" {
        ...vserver-config...
    }
}
</pre>

But with 1.4.19 (from Debian backports), this stopped working. We now 
have to use:
something like this:
<pre>
var.allowedip = "192.168.10.10"
$HTTP["host"] == "vhost1.srv.tld" {
    $HTTP["remoteip"] =~ var.allowedip {
        ...vserver-config...
    }
}
$HTTP["host"] == "vhost2.srv.tld" {
    $HTTP["remoteip"] =~ var.allowedip {
        ...vserver-config...
    }
}
</pre>

Is this a Bug or the desired behavior???

Bruno