Project

General

Profile

Actions

server.document-root

server.document-root - root of filesystem path from which to serve requests
The url-path of a request is decoded and appended to the server.document-root to generate a filesystem path for the request.
Default: none; setting server.document-root in lighttpd.conf is required.

server.document-root set in global scope (i.e. not inside lighttpd.conf conditionals) will be used for all requests without a Host: header and all other requests unless you conditionally overwrite its value by something like


server.document-root = "/var/www/default" 
$HTTP["host"] == "host2.example.org" {
  server.document-root = "/var/www/host2.example.org" 
}
In this case, requests with Host: host2.example.org go to /var/www/host2.example.org, all others to /var/www/default Only absolute paths (e.g. "/var/www/web/") are supported, relative paths (like ~/web or ./web) will most certainly lead to errors. Default: no default, required

Updated by gstrauss almost 2 years ago · 14 revisions