Gitweb configuration, the easy way
Posted on: December 28, 2010
- In: Uncategorized
- 2 Comments
Ok if you have juste one git repository, git instaweb is for you. This command automatically generate the config to connect with a webserver installed on your server. I recommand you to try, it’s impressive as it’s simple. For me the best config is :
git instaweb -d webrick
Now if you have several git projects as I am, you want to use gitweb. In fact instaweb uses the gitweb script but configured for one specific repository. The script is in .git/gitweb/gitweb.cgi .
On Ubuntu, install the script with the command:
apt-get install gitweb
I’m going to assume you have apache2 and mod_perl installed. So in the config file
/etc/apache2/sites-enabled/000-default
add this config at the end of the VirtualHost block:
ScriptAlias /git “/usr/lib/cgi-bin/gitweb.cgi”
<Directory “/home/git/”>
Options Indexes FollowSymLinks ExecCGI
Order allow,deny
Allow from all
</Directory>
Now you just have to configure gitweb by setting the directory containing your git projects in the file:
/etc/gitweb.conf
Finally, restart apache and you should be able to browse your projects on this url:
2 Responses to "Gitweb configuration, the easy way"
Thanks a lot
in /etc/gitweb.conf edit to something like:
$projectroot = “/home/username/”;
@+
March 15, 2011 at 8:44 PM
That was way to easy… thanks.