lighttp 配制文件

来源:互联网 发布:淘宝联盟安卓 编辑:程序博客网 时间:2024/05/18 11:49

虚拟主机的设置:

$HTTP["host"] == "test.com" {
server.name = "test.com"
server.document-root = "/opt/htdocs/news"
server.errorlog = "/opt/lighttpd/log/news-error.log"
server.error-handler-500   = "/error-500.html"
server.error-handler-404   = "/error-404.php"
#accesslog.filename = "/opt/lighttpd/log/news-access.log"
index-file.names = ( "default.shtml","index.php", "index.html", "index.htm" )

#伪静态规则 示例

url.rewrite-once = (
"^(.*)/archiver/((fid|tid)-[w-]+.html)$" => "$1/archiver/index.php?$2",
"^(.*)/forum-([0-9]+)-([0-9]+).html$" => "$1/forumdisplay.php?fid=$2&page=$3",
"^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+).html$" => "$1/viewthread.php?tid=$2&extra=page%3D$4&page=$3",
"^(.*)/space-(username|uid)-(.+).html$" => "$1/space.php?$2=$3",
"^(.*)/tag-(.+).html$" => "$1/tag.php?name=$2"
)


}




原创粉丝点击