Bug #129
closedlighttpd fails to run the CGI script (no such file or directory) if the server.document-root is not absolute
Description
lighttpd fails to run the CGI script (no such file or directory) if the
server.document-root is not absolute.
For example:
server.document-root = "webroot" # doesn't work
server.document-root="/home/guests/pts/d/webroot" # solves the problem
Moreover, lighttpd sends a bogus HTTP reply if it cannot execute the CGI:
HTTP/1.0 200 OK
Connection: close
Server: lighttpd/1.3.13
The reason of the error etc. is not indicated, and the document body is
missing.
-- pts
Updated by Anonymous almost 20 years ago
Did you attempt to strace and figure out exactly where it was looking for "webroot?" this one should probably be closed as "worksforme" or "invalid" as there isn't one that's labelled "pebkac."
-- infowolfe
Updated by gstrauss over 1 year ago
- Description updated (diff)
- Status changed from Wontfix to Invalid
- ASK QUESTIONS IN Forums set to No
lighttpd uses the current working directory as a base directory if lighttpd is not running as a daemon.
If lighttpd is running as a daemon, then the current working directory is /
You should be using full (absolute) paths in server.document-root
See Docs_Configuration for how to configure server.document-root
using an environment variable, so that you can set the environment variable to a custom (and absolute) path before starting lighttpd.
Also available in: Atom