我有一个 lighttpd 服务器,其网站位于/home/httpd/example.com/httpdocs中,我有一个名为file.php的文件。当我输入http://en.example.com/file.php时,我想显示默认网站目录中的file.php(如上所述)。
所以我使用了这里描述的文档根:
http://redmine.lighttpd.net/wiki/1/Server.document-rootDetails
以这种方式:
$HTTP["host"] =~ "en.example.com/file.php" {
server.document-root = "/home/httpd/example.com/httpdocs/"
}
但不幸的是,当我在浏览器中键入http://en.example.com/file.php时,我收到错误 404。我做错了什么以及如何修复它以使其正常工作?