lighttpd 虚拟主机、(别名)虚拟目录配置

Posted 11 months, 1 week ago at 11:32 am. 0 comments

ad 468x60

lighttpd 虚拟主机配置

编辑 /etc/lightpd/lighttpd.conf 文件,添加:

$HTTP["host"] == “wiki.guoshuang.com” {
server.name = “wiki.guoshuang.com”
server.document-root = “/var/www/guoshuang”
server.errorlog = “/var/www/guoshuang/cuowu.log”
accesslog.filename = “/var/www/guoshuang/cuowu.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 错误。

Popularity: 9% [?]

Tags: , ,

No Replies

Feel free to leave a reply using the form below!


Leave a Reply