First install: $ sudoapt-getinstallgitwebgitweb.cgi script installed in/usr/lib/cgi-bin/, which is the default cgi-bin directory of apache2 on Ubuntu. Therefore, open http: // localhost/cgi-bin/gitweb. cgi without css loading by default, and connect the static files used by gitweb to enentro.
First install:
$ Sudo apt-get install gitweb
The gitweb. cgi script is installed in/usr/lib/cgi-bin/. This directory is the default cgi-bin directory of apache2 on Ubuntu. Therefore, open:
Http: // localhost/cgi-bin/gitweb. cgi
By default, no css is loaded. Connect the static files used by gitweb to DocumentRoot:
$ Cd/var/www/
$ Sudo ln-s/usr/share/gitweb /*.
Modify Configuration:
$ Sudo vi/etc/gitweb. conf
Change $ projectroot to the directory where each. git is stored. Save and refresh the browser.
Related Posts
If no project is found, you need to change the projectroot/*. git attribute to 755 so that apache users have the read permission. You can only change the git that you want others to access through the web.
Http: // localhost/cgi-bin/gitweb. cgi
/Etc/gitweb. conf content:
# Path to git projects ( . Git)
$ Projectroot = "/var/git/repositories ";
# 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 'favicons'
$ Favicon = "/gitweb/git-favicon.png ";