让gitweb跑起来!

让gitweb跑起来!
首先要配置apache服务器的配置文件:
/etc/httpd/conf/httpd.conf

[root@localhost conf]# pwd
/etc/httpd/conf
[root@localhost conf]# ls
httpd.conf  magic
[root@localhost conf]# pwd
/etc/httpd/conf
[root@localhost conf]#




要在最下面加上如下的语句
<VirtualHost *:80>
        ServerName 192.168.110.123
        DocumentRoot /var/www/git
                <Directory /var/www/git>
                        Options ExecCGI +FollowSymLinks +SymLinksIfOwnerMatch
                        AllowOverride All
                        order allow,deny
                        Allow from all
                        AddHandler cgi-script cgi
                        DirectoryIndex gitweb.cgi
                </Directory>
</VirtualHost>

上面指定了服务器启动脚本的位置以及启动脚本
gitweb.cgi  static
[root@localhost git]# pwd
/var/www/git
[root@localhost git]# ls
gitweb.cgi  static
[root@localhost git]#

其次是对gitweb的配置文件进行修改:
/etc/gitweb.conf
$projectroot = "/home/git/repositories";
指明仓库的位置
[root@localhost repositories]# ls
favicon.ico        image6500.git     light_logo.png  poweredby.png
gitosis-admin.git  light_button.png  mediatek.git    test.git
[root@localhost repositories]# ls
favicon.ico        image6500.git     light_logo.png  poweredby.png
gitosis-admin.git  light_button.png  mediatek.git    test.git
[root@localhost repositories]# cd test.it
bash: cd: test.it: 没有那个文件或目录
[root@localhost repositories]# cd test.git
[root@localhost test.git]# ls
branches  description           HEAD   info     refs
config    git-daemon-export-ok  hooks  objects
[root@localhost test.git]#
最后是运行:
service httpd start
ok,可以运行起来了
http://192.168.110.123

gitosis-admin.git
    Unnamed repository; edit this...
   
    7 weeks ago
    summary | shortlog | log | tree


image6500.git
    Unnamed repository; edit this...
   
    5 months ago
    summary | shortlog | log | tree


mediatek.git
    Unnamed repository; edit this...
   
    5 months ago
    summary | shortlog | log | tree


test.git
    Unnamed repository; edit this...
   
    5 months ago
    summary | shortlog | log | tree

















转载于:https://my.oschina.net/u/174445/blog/37057

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值