Lighttpd虚拟主机配置

为了在Lighttpd增加一个额外的站点lighttpd.example.com,我们只需在lighttpd.conf配置文件中加入如下代码:

  1. $HTTP["host"] == "lighttpd.example.com" {
  2.   server.document-root = "/home/bizhat/lighttpd.example.com/"
  3.   server.errorlog = "/var/log/lighttpd/lighttpd_error.log"
  4.   accesslog.filename = "/var/log/lighttpd/lighttpd_access.log"
  5.   server.error-handler-404   = "/img/nohotlink.gif"
  6. }