本地配置gitweb服务
1.先通过mirror命令clone下载mirror镜像(非完整代码)
repo init -u ssh://account@server:port/platform/manifest -b branch_name --mirror
repo sync
2.先安装 gitweb和 apache2
4. 使能cgi:
1.先通过mirror命令clone下载mirror镜像(非完整代码)
repo init -u ssh://account@server:port/platform/manifest -b branch_name --mirror
repo sync
2.先安装 gitweb和 apache2
sudo apt-get install apache2 git-core gitweb3. 修改配置文件(因为gitweb在/etc/apache2/conf.d/下安装了配置文件,这个目录是过时的):
sudo cp /etc/apache2/conf.d/gitweb /etc/apache2/conf-available/gitweb.conf
cd /etc/apache2/conf-enabled
sudo ln -s ../conf-available/gitweb.conf 修改gitweb.conf 如下:
sudo vi ../conf-available/gitweb.conf
Alias /gitweb /usr/share/gitweb
<Directory /usr/share/gitweb>
Options +FollowSymLinks +ExecCGI
AddHandler cgi-script .cgi
</Directory> (在 FollowSymLinks之前加上了 "+"解决语法问题)
4. 使能cgi:
ubuntu中gitweb cgi脚本应该默认放在/usr/li

本文介绍了如何在Ubuntu 14.04上配置gitweb,将gitweb的cgi脚本放置在/usr/lib/cgi-bin/目录下,并与apache2的cgi-bin目录同步。在重启apache2后,可以访问多个git项目,尽管当项目数量过多时,gitweb首页加载速度可能会变慢。推荐的外部访问地址为http://ip/gitweb。
959

被折叠的 条评论
为什么被折叠?



