讓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
相關文章
相關標籤/搜索