在 server.modules 部分将以下几个模块前的注释去掉:
mod_simple_vhost
这里将配置以下几个虚拟主机:
www.liumin.name
www.zzxxw.net
对应的目录分别为:
# For virtual host: www.liumin.name
/var/www/lighttpd/vhosts/liumin.name/
/var/www/lighttpd/vhosts/liumin.name/htdocs/
/var/www/lighttpd/vhosts/liumin.name/logs/
# For virtual host: www.zzxxw.net
/var/www/lighttpd/vhosts/zzxxw.net/
/var/www/lighttpd/vhosts/zzxxw.net/htdocs/
/var/www/lighttpd/vhosts/zzxxw.net/logs/
设置目录和权限:
# mkdir -p /var/www/lighttpd/vhosts/liumin.name/{htdocs,logs}
# mkdir -p /var/www/lighttpd/vhosts/zzxxw.net/{htdocs,logs}
# chown -R www:www /var/www/lighttpd/
配置:
$HTTP["host"] == “www.liumin.name” {
server.document-root = “/var/www/lighttpd/vhosts/liumin.name/htdocs/”
server.errorlog = “/var/www/lighttpd/vhosts/liumin.name/logs/error”
accesslog.filename = “/var/www/lighttpd/vhosts/liumin.name/logs/access”
server.error-handler-404 = “/index.php”
}
$HTTP["host"] == “www.zzxxw.net” {
server.document-root = “/var/www/lighttpd/vhosts/zzxxw.net/htdocs/”
server.errorlog = “/var/www/lighttpd/vhosts/zzxxw.net/logs/error”
accesslog.filename = “/var/www/lighttpd/vhosts/zzxxw.net/logs/access”
server.error-handler-404 = “/index.php”
}











“配置Lighttpd下的虚拟主机”才1条评论
反向链接/文章引用
发表留言