安裝gitweb
git clone git://git.kernel.org/pub/scm/git/git.git cd git/ sudo make GITWEB_PROJECTROOT="/Users/<user>/repositories" \ GITWEB_CSS="/gitweb/gitweb.css" \ GITWEB_LOGO="/gitweb/git-logo.png" \ GITWEB_FAVICON="/gitweb/git-favicon.png" \ bindir=//usr/local/bin \ gitweb sudo make gitwebdir=/var/www/gitweb install-gitweb
設定gitweb
vimlink 1
2
3
4
5
6
projectroot = "/Users/<user>/repositories";
GIT = "/usr/local/bin/git" #重要-git執行擋的位置
* **設定apache**
```sudo vim /etc/apache2/httpd.confListen 8080 #Gitweb <VirtualHost *:8080> ServerName gitserver DocumentRoot /var/www/gitweb SetEnv GITWEB_CONFIG /etc/gitweb.conf <Directory /var/www/gitweb> Options ExecCGI +FollowSymLinks +SymLinksIfOwnerMatch AllowOverride All order allow,deny Allow from all AddHandler cgi-script cgi DirectoryIndex gitweb.cgi </Directory> </VirtualHost>
設定repo目錄權限
- 目錄權限如果不對,gitweb無法顯示專案
chmod -R 755 /Users/<user>/repositories
- 目錄權限如果不對,gitweb無法顯示專案