debian:/home/stone/web-bak/etc/lighttpd/conf-available# cat 11-simple-vhost.conf
## Simple name-based virtual hosting
##
## Documentation: /usr/share/doc/lighttpd-doc/simple-vhost.txt
## http://www.lighttpd.net/documentation/simple-vhost.html
server.modules += ( "mod_simple_vhost" )
## The document root of a virtual host isdocument-root =
## simple-vhost.server-root + $HTTP["host"] + simple-vhost.document-root
simple-vhost.server-root = "/var/www"
simple-vhost.document-root = "/public/"
## the default host if no host is sent
simple-vhost.default-host = "default.com"
$HTTP["host"] =="www.xx703.com"{
server.document-root = "/var/www/www.xx703.com/public"
url.rewrite = ( "^/$"=>"index.html","^([^.]+)$"=> "$1.html")
server.error-handler-404 = "/dispatch.fcgi"
fastcgi.server = ( ".fcgi" =>
("localhost"=>
("min-procs"=> 2,
"max-procs"=> 2,
"socket"=> "/tmp/wwwsm703com.fcgi.socket",
"bin-path"=> "/var/www/www.xx703.com/public/dispatch.fcgi",
"bin-environment"=> ( "RAILS_ENV" => "development")
)
)
)
}
$HTTP["host"]=~"noteme.net" {
server.document-root = "/var/www/note"
}
$HTTP["host"]=~"(www.sm114.cn|sm114.cn)" {
server.document-root = "/var/www/sm114"
}
$HTTP["host"]=~"(www.0598114.com|0598114.com)" {
server.document-root = "/var/www/sm114"
}
$HTTP["host"]=~"(^|\.)pk0598\.com" {
server.document-root = "/var/www/sm18900"
}
$HTTP["host"]=="db.sm114.cn" {
server.document-root = "/var/www/phpMyAdmin2902"
auth.require =("/"=>
(
"method"=>"basic",
"realm"=>"need password",
"require" => "user=stone"
)
)
}
|