Hello guys,
first of all, thanks for this wonderful piece of software!
Running Lighttpd
1.5 for about half a year now, updating to HEAD now and
then. A few stability
issues at the beginning have been resolved after a while.
We have one problem though. We try to show a custom 503 page
when our
application is down for maintainance, like described over
here:
http://johnleach.co.uk/words/archives/2007/01/10/251/
From lighttpd.conf:
magnet.attract-raw-url-to = (
"/etc/lighttpd-1.5/magnet.lua" )
magnet.lua
if
(lighty.stat("/u/apps/ss2-rails/shared/system/maintenan
ce.html")) then
lighty.status["maintenance.hits"] =
lighty.status["maintenance.hits"] + 1
lighty.content = { { filename
=
"/u/apps/ss2-rails/shared/system/maintenance.html"
} }
lighty.header["Content-Type"] =
"text/html"
return 503
end
When using curl or or a text browser (links), the page is
correctly displayed
(although the default error message is appended, see
http://trac
.lighttpd.net/trac/ticket/1420). In "real"
browsers like Firefox
and Konqueror, the page just loads forever, waiting for data
to arrive (?).
Furthermore, I tried using
"server.errorfile-prefix" with a custom 503 page
in that directory. I modified my magnet script like this, so
as to return the
error code only:
if
(lighty.stat("/u/apps/ss2-rails/shared/system/maintenan
ce.html")) then
lighty.status["maintenance.hits"] =
lighty.status["maintenance.hits"] + 1
-- lighty.content = { { filename
=
"/u/apps/ss2-rails/shared/system/maintenance.html"
} }
-- lighty.header["Content-Type"] =
"text/html"
return 503
Same problem then!
I don't know what's happening here. Maybe this is about
problems
with "Keep-Alive"? Sorry for guessing so badly, I
am not a HTTP expert..
Any help would be greatly appreciated!
Greetings
Martin
|