|
|
lighttpd的虚拟主机不会弄。
如果将 $HTTP["host"] == "www.mydomain.com" { 这行注释掉(还有“}”),就能正常运行,否则服务器起不来。
lighttpd.conf如下:
##############
# variables
var.logdir = "/var/log/lighttpd"
var.statedir = "/var/lib/lighttpd"
##############
# modules
# NOTE: the order of modules is important.
server.modules = (
"mod_rewrite",
"mod_alias",
"mod_access",
"mod_fastcgi",
"mod_evhost",
"mod_compress",
"mod_accesslog"
)
##############
# server settings
server.username = "lighttpd"
server.groupname = "lighttpd"
server.pid-file = "/var/run/lighttpd.pid"
server.indexfiles = ( "index.html", "index.php", "index.rhtml" )
server.follow-symlink = "enable"
server.event-handler = "linux-sysepoll"
##############
# mod_staticfile
static-file.exclude-extensions = (".php", ".rhtml", ".pl", ".cgi", ".fcgi")
##############
# mod_access
url.access-deny = ("~", ".inc", ".pl", ".sh")
##############
# mod_compress
compress.cache-dir = var.statedir + "/cache/compress"
compress.filetype = ("text/plain", "text/html")
##############
# virtual hosts
$HTTP["host"] == "www.mydomain.com" {
server.name = "www.mydomain.com"
server.document-root = "/var/www/mydomain"
server.error-handler-404 = "/var/www/mydomain/404.html"
server.errorlog = var.logdir + "/mydomain_error.log"
accesslog.filename = var.logdir + "/mydomain_access.log"
fastcgi.server = ( ".php" =>
( "www.mydomain.com" =>
(
"host" => "127.0.0.1",
"port" => 1026,
"bin-path" => "/usr/bin/php-cgi"
)
)
)
}
##############
# mime types
include "mimetype.conf" |
|