29 Jun 02:57
Conditional Config Ordering
From: Perry Clarke <pclarke <at> bitgravity.com>
Subject: Conditional Config Ordering
Newsgroups: gmane.comp.web.lighttpd
Date: 2008-06-29 01:00:56 GMT
Subject: Conditional Config Ordering
Newsgroups: gmane.comp.web.lighttpd
Date: 2008-06-29 01:00:56 GMT
I don't understand some of the ordering dependencies in the
conditional configuration stuff. I'm using lighttpd 1.4.19.
For example, this first method doesn't work ("server.error-
handler-404" is never set):
> $HTTP["url"] =~ "^/foobar/" {
> $HTTP["useragent"] != "my-ua-str" {
> server.error-handler-404 = "/foobar/req_error_handler.php"
> }
> }
while merely swapping the order of the clauses makes it work
correctly depending on the incoming request:
> $HTTP["useragent"] != "my-ua-str" {
> $HTTP["url"] =~ "^/foobar/" {
> server.error-handler-404 = "/foobar/req_error_handler.php"
> }
> }
There are times when one order is much more convenient than another
so it would be better if ordering wasn't such an issue (this is just
one example, I've tripped over similar ordering issues several times).
Is there logic behind this that isn't obvious?
Perry
RSS Feed