Ubuntu 22.04
Sponsored Link

Git : Install Gitweb2022/09/27

 
Install Gitweb to refer to repositories on Web Browser.
[1]
[2] Install Gitweb.
root@dlp:~#
apt -y install gitweb
root@dlp:~#
vi /etc/gitweb.conf
# line 2 : root directory of Git repositories

$projectroot = "/var/lib/git";
root@dlp:~#
vi /etc/apache2/conf-available/gitweb.conf
Alias /gitweb /usr/share/gitweb

  <Directory /usr/share/gitweb>
    Options +FollowSymLinks +ExecCGI
    AddHandler cgi-script .cgi
    # add access permission if you need
    Require ip 127.0.0.1 10.0.0.0/24
  </Directory>

root@dlp:~#
a2enmod cgi rewrite

root@dlp:~#
systemctl restart apache2

[3] Access to [(Server's Hostname or IP address/gitweb/)] on Web browser, then you can see repositories.
Matched Content