首先安装:$ sudo apt-get install gitwebgitweb.cgi 脚本安装在 /usr/lib/cgi-bin/ 中,该目录为默认 Ubuntu 上 apache2 的 cgi-bin 目录。所以,打开:http://localhost/cgi-bin/gitweb.cgi默认没有 css 加载,把 gitweb 要用的静态文件连接到 DocumentRoot 下:$ cd /var/www/
$ sudo ln -s /usr/share/gitweb/* .修改配置:$ sudo vi /etc/gitweb.conf将 $projectroot 改为存放各个 .git 的目录。保存后刷新浏览器。
Related Posts如果没有找到项目,你需要将projectroot/*.git 的属性改为755,让apache用户有可读权限。可以只改你需要让别人通过web访问的那个git。
http://localhost/cgi-bin/gitweb.cgi
/etc/gitweb.conf 内容:
# path to git projects (<project>.git)
$projectroot = "/var/git/repositories";# 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
$stylesheet = "/gitweb/gitweb.css";# logo to use
$logo = "/gitweb/git-logo.png";# the "favicon"$favicon = "/gitweb/git-favicon.png";用键盘解放Linux——deb系列工具技巧Linux下分割、合并文件——dd和cat相关资讯 Ubuntu Gitweb
- 如果没有Ubuntu,我们将去哪里? (02月04日)
- Libra—扁平化风格Ubuntu Unity主 (11/30/2014 08:21:04)
- 一盘棋:Ubuntu明明不赚钱为什么还 (08/19/2013 16:59:50)
| - 桌面/移动端 Ubuntu 将获重大 UI (09/29/2015 11:48:18)
- Ubuntu将消失 有人欢喜有人愁 (10/18/2013 11:43:45)
- 烧钱不断的Ubuntu——一个理想主义 (08/14/2013 07:36:21)
|
本文评论 查看全部评论 (0)