gitweb setup base on git repo

来源:互联网 发布:星际淘宝网txt全文下载 编辑:程序博客网 时间:2024/05/20 23:05

-----------------

git

 /srv/project.git

------------------------

cat /etc/gitweb.conf

# path to git projects (<project>.git)
$projectroot = "/srv";

# directory to use for temp files
$git_temp = "/tmp";

# target of the home link on top of all pages
#$home_link = $my_uri || "/";

# html text to include at home page
$home_text = "indextext.html";

# file with project list; by default, simply scan the projectroot dir.
$projects_list = $projectroot;

# stylesheet to use
@stylesheets = ("static/gitweb.css");

# javascript code for gitweb
$javascript = "static/gitweb.js";

# logo to use
$logo = "static/git-logo.png";

# the 'favicon'
$favicon = "static/git-favicon.png";

# git-diff-tree(1) options to use for generated patches
#@diff_opts = ("-M");
#
#$feature{'blame'}{'default'} = [1];
#$feature{'blame'}{'override'} = 1;
#$feature{'snapshot'}{'default'} = ['zip', 'tgz'];
#$feature{'snapshot'}{'override'} = 1;

@diff_opts = ();

 

------------------------------------

apache2 config:

<VirtualHost *:8081>
    DocumentRoot /srv
    <Directory "/srv">
        Allow from All
        Options +ExecCGI
        AllowOverride All
    </Directory>
    SetEnv GIT_PROJECT_ROOT /srv
    SetEnv GIT_HTTP_EXPORT_ALL
    ScriptAlias /git/ /usr/lib/git-core/git-http-backend
</VirtualHost>

 

service apache2 restart

 

0 0
原创粉丝点击