操作
server.document-root¶
server.document-root
- 服务请求的文件系统路径根目录
请求的URL路径会被解码并附加到 server.document-root
,以生成请求的文件系统路径。
默认值:无;在 lighttpd.conf 中设置 server.document-root
是必需的。
在全局范围(即不在 lighttpd.conf 条件语句内)设置的 server.document-root
将用于所有不带 Host:
头的请求以及所有其他请求,除非您通过类似以下方式有条件地覆盖其值
server.document-root = "/var/www/default" $HTTP["host"] == "host2.example.org" { server.document-root = "/var/www/host2.example.org" }在这种情况下,带有 Host: host2.example.org 的请求将指向 /var/www/host2.example.org,所有其他请求则指向 /var/www/default。仅支持绝对路径(例如 "/var/www/web/"),相对路径(如 ~/web 或 ./web)几乎肯定会导致错误。默认值:无默认值,必需