I have a problem with nested conditionals in my lighty config. The
following works:
$HTTP["url"] !~ "^/(resources/|static/|favicon.ico)" {
scgi.server = (
[...]
)
}
I.e. for every URL path not starting with of the given paths the request
is passed to the SCGI server. But in the process to introduce different
host names which should be handled by different SCGI servers, I started
by adding nested conditional like this:
$HTTP["url"] !~ "^/(resources/|static/|favicon.ico)" {
$HTTP["host"] = "^myhost.com" {
scgi.server = (
[...]
)
}
}
(In a second step I would add an "else" clause to the inner conditional
for the other host name.) But this doesn't work: Now *every* request is
passed to the SCGI server with the result, that static files are not
delivered. Seems like the outer conditional isn't respected at all.
What am I doing wrong?
# lighttpd -v
lighttpd-1.4.11 (ssl) - a light and fast webserver
Build-Date: Jun 14 2006 17:11:11
TIA and regards,
Johannes
on 13.10.2006 09:45
on 13.10.2006 09:56
Sorry: Johannes Beigel wrote: > $HTTP["url"] !~ "^/(resources/|static/|favicon.ico)" { > $HTTP["host"] = "^myhost.com" { This should read "=~" not "=" (This was a copy&paste&edit error of mine, so that's not causing the problem described above). Regards, Johannes.
on 13.10.2006 11:11
There's a ticket with a similar problem:
http://trac.lighttpd.net/trac/ticket/41 with a similar problem
(URL and host conditional nested the other way round). But this bug was
fixed a long time ago.
Anyway, I just updated my lighttpd version to 1.4.13 but it didn't make
any difference. :-/
on 13.10.2006 11:22
Johannes Beigel wrote: > There's a ticket with a similar problem: > > http://trac.lighttpd.net/trac/ticket/41 with a similar problem > > (URL and host conditional nested the other way round). But this bug was > fixed a long time ago. > > Anyway, I just updated my lighttpd version to 1.4.13 but it didn't make > any difference. :-/ Doesn't work for me either, but I'm still thrilled getting WebDAV to work under OSX (don't know what's going on with XP). Having this fixed would be seriously cool.
on 13.10.2006 12:54
Richard Warburton wrote: > Doesn't work for me either, OK, since you can confirm this, I've reopened the ticket: http://trac.lighttpd.net/trac/ticket/41

