lighttpd 虚拟主机配置编辑 /etc/lightpd/lighttpd.conf 文件,添加:
$HTTP["host"] == “www.***.com” {
server.name = “www.***.com”
server.document-root = “/data/www/123”
server.errorlog = “/data/logs/123/error.log”
accesslog.filename = “/data/logs/123/error2.log”
}
保存。重启 lightpd 即可。
lighttpd(别名)虚拟目录配置
server.modules += ( “mod_alias” )
alias.url = ( “/cgi-bin/” => “/home/lighttpd/theos.in/cgi-bin/” )
Browse all documents installed at /usr/share/doc/ directory with following alias:
alias.url = ( “/docs/” => “/usr/share/doc/” )
alias.url += ( “/stats/” => “/home/theos.in/http/webalizer/” )
拒绝下载 ~ 和 .inc 文件。
url.access-deny = ( “~”, “.inc” )
wikipedia 虚拟主机以后需要修改 LocalSettings.php 的目录。否则报告 404 错误。
阅读(2783) | 评论(0) | 转发(0) |