Project

General

Profile

Actions

Bug #129

closed

lighttpd fails to run the CGI script (no such file or directory) if the server.document-root is not absolute

Added by Anonymous almost 20 years ago. Updated over 1 year ago.

Status:
Invalid
Priority:
Normal
Category:
mod_cgi
Target version:
-
ASK QUESTIONS IN Forums:
No

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

Actions #1

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

Actions #2

Updated by stbuehler over 16 years ago

  • Status changed from Fixed to Wontfix
Actions #3

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.

Actions

Also available in: Atom