项目

一般

个人资料

操作

cgit 使用指南

cgit 是一个用于Git仓库的网页前端。你需要运行一个FastCGI CGI包装器(参见CGI使用指南)。

Lighttpd 配置

setup {
    module.load ( "mod_rewrite", "mod_fastcgi", "mod_vhost" );
}

var.vhosts = [];

# ...

var.vhosts = var.vhosts + [
    "cgit.lighttpd.net" => {
        if request.path =^ "/static/" {
            alias "/static/" => "/usr/share/cgit";
        } else {
            rewrite "/cgit.cgi?url=%{enc:request.path}&%{request.query}";
            docroot "/usr/lib/cgi-bin";       # docroot after rewrite !
            fastcgi "unix:/var/run/lighttpd/sockets/www-cgi.sock";
        }
    }
];

# ...

vhost.map var.vhosts;

/etc/cgitrc

css=/static/cgit.css
virtual-root=/

更新者:presbrey 近13年前 · 4次修订