Chinaunix首页 | 论坛 | 博客
  • 博客访问: 58926
  • 博文数量: 11
  • 博客积分: 546
  • 博客等级: 中士
  • 技术积分: 140
  • 用 户 组: 普通用户
  • 注册时间: 2010-09-19 20:00
文章分类
文章存档

2010年(11)

分类: 嵌入式

2010-12-06 18:02:09


首先安装:

$ sudo apt-get install gitweb

gitweb.cgi 脚本安装在 /usr/lib/cgi-bin/ 中,该目录为默认 ubuntu 上 apache2 的 cgi-bin 目录。所以,打开:



默认没有 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。



/etc/gitweb.conf 内容:
# path to git projects (.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";
阅读(1864) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~