SCGI Interface

Module: mod_scgi


Brief description of mod_scgi directives

option description
scgi.debug a value between 0 and 65535 to set the debug-level in the SCGI module
scgi.server tell the module where to send SCGI requests to
scgi.protocol protocol between lighttpd and backend server ("scgi" (default) or "uwsgi") Added in 1.4.42
scgi.server-option description
host is ip of the SCGI process
port is tcp-port on the "host" used by the SCGI process
socket path to the unix-domain socket
bin-path path to the local SCGI binary which should be started if no local SCGI is running
bin-environment set environment of SCGI binary
bin-copy-environment copy environment from server for SCGI binary
listen-backlog listen backlog queue size (for backend daemons started by mod_scgi)
docroot docroot on the remote host
x-sendfile controls if X-Sendfile header is allowed
x-sendfile-docroot limits the directory trees permitted for use with X-Sendfile response header
broken-scriptfilename breaks SCRIPT_FILENAME in a way that PHP can extract PATH_INFO from it
idle-timeout number of seconds before a unused process gets terminated
max-procs upper limit of processes to start
min-procs sets the minium processes to start
max-load-per-proc maximum number of waiting processes on average per process before a new process is spawned
check-local enable/disable check for requested file in document root (default: enabled)
disable-time time to wait before a disabled backend is checked again
strip-request-uri strip part of request-uri

Details for scgi.server parameters can be found in mod_fascgi documentation, since the SCGI module is heavily based on the FastCGI module, and fastcgi.server parameters are very similar.

Note "check-local" is enabled by default, due to historical reasons, but most users serving virtual paths will want to disable it. If enabled, lighttpd first checks for a file in the local 'server.document-root' tree and returns 404 (Not Found) if no such file exists. If disabled, lighttpd forwards the request to the backend without performing this check.

Examples how to set up Python WSGI server with lighttpd: HowToPythonWSGI