Subdomain
Lighttpd 子域
$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。