server git untuk coding bareng-bareng
Bismillah
q> Install git-core, apache2 dan gitweb
q> Update repo Ubuntu dulu
sudo apt-get update
q> Install git-core
sudo apt-get install git-core
q> Install apache2
sudo apt-get apache2
q> Install gitweb
sudo apt-get gitweb
q> Buat repo
sudo git init /var/git/myproject
q>sudo git init --bare --shared /var/git/myprojectq> Edit file default pada /etc/apache2/site-available
sudo nano /etc/apache2/site-available/defaultq> Menjadi seperti ini :
<VirtualHost *:80> DocumentRoot /var/git <Directory "/var/git"> Allow from All Options +ExecCGI AllowOverride All </Directory> SetEnv GIT_PROJECT_ROOT /var/git SetEnv GIT_HTTP_EXPORT_ALL ScriptAlias /git/ /usr/lib/git-core/git-http-backend/ </VirtualHost>q> kemudian simpan -> ctrl+o dan keluar ctrl+x
q> Kemudain edit lagi file gitweb.conf yang ada pada /etc
sudo nano /etc/gitweb.confq> Menjadi seperti ini
# path to git projects (<project>.git) $projectroot = "/var/git"; # 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";q> Kemudian simpan dengan Ctrl+O dan keluar dengan Ctrl+X
q> Kemudian edit file gitweb yang ada pada apache2
sudo nano /etc/apache2/conf.d/gitwebq> Menjadi seperti ini
Alias /gitweb /usr/share/gitweb <Directory /usr/share/gitweb> Options FollowSymLinks +ExecCGI AddHandler cgi-script .cgi </Directory>q> Simpan dan keluar.
q> Restart apache2
sudo /etc/init.d/apache2 restartq> Kemudian buka pada client web untuk server git menggunakan brower, seumpama IP address dari server git ini adalah 192.168.2.202 maka akses dengan alamat http://192.168.2.202/
q> Untuk membuka gitweb, misalnya IP address server git adalah 192.168.2.202 maka,
akases lewat browser http://192.168.2.202/gitweb
Alhamdulillah
Sumber ::
http://www.tikalk.com/setup-git-and-gitweb-under-apache-ubuntu
404 not found. The requested URL /gitweb was not found on this server.
kira2 apa yang salah atau terlupakan?
mohon koreksinya.
terimakasih
apakah apache nya sudah dijalankan ?? 404 not found berarti folder gitweb tidak ditemukan pada web server apache