$HTTP["host"] == "example.com" {
server.document-root = "/var/www/vhosts/example.com/httpdocs/development/api"
server.errorlog = "/var/log/lighttpd/error.log"
accesslog.filename = "/var/log/lighttpd/access.log"
}
$HTTP["host"] == "api.example.com" {
server.document-root = "/var/www/vhosts/example.com/httpdocs/development/api"
server.errorlog = "/var/log/lighttpd/error.log"
accesslog.filename = "/var/log/lighttpd/access.log"
}
$HTTP["host"] == "example.org" {
server.document-root = "/var/www/vhosts/example.com/httpdocs/development/services"
server.errorlog = "/var/log/lighttpd/error.log"
accesslog.filename = "/var/log/lighttpd/access.log"
}
以上是我的 lighttpd.conf 的摘录。example.com 和 example.org 工作正常。知道为什么 api.example.com 拒绝工作吗?
谢谢!
确保“api.example.com”解析为 DNS 中服务器的 IP。