项目

通用

个人资料

操作

Lighttpd 的 Blosxom 配置

这是在 FreeBSD 上 lighttpd.conf 中的虚拟主机设置,可与简洁 URL 配合使用。

index-file.names  = ( "blosxom.cgi", "index.shtml", "index.html", "index.htm", "default.htm")

$HTTP["host"] =~ "(^|\.)galj\.info$" {
server.document-root = "/usr/blosxom/galj" 
url.rewrite  = ( 
#"^/([a-zA-Z_0-9\-]+)(\.jpg)$" => "$1.jpg",
"^/([0-9]+)/?$"             => "/blosxom.cgi/$1",  
"^/([0-9]+)/?([0-9]+)/?$"             => "/blosxom.cgi/$1/$2", 
"^/([0-9]+)/([0-9]+)/([0-9]+)/?$"             => "/blosxom.cgi/$1/$2/$3", 
"^/index.atom"             => "/blosxom.cgi/index.atom", 
"^/index.rss"             => "/blosxom.cgi/index.rss" 
)
server.error-handler-404   = "/blosxom.cgi" 
}

这不包含 Blosxom 中 /images/ 的简洁解决方案。补救措施是在条目中使用图像的完整路径。

还有其他问题可能取决于——但不一定是由——Blosxom 使用的插件引起。它与使用大约 20 个通用和自制插件的配置配合良好。为了捕获错误,404 错误处理程序会重定向回普通的 blosxom.cgi,这总比什么都没有强。

注意:显然是由正则表达式非专家完成的!

gstrauss3 年多前更新 · 7 次修订