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"] == "" {
  server.document-root = "/var/www/" 
In this case, requests with Host: go to /var/www/, 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 3 months ago · 14 revisions