bcaccinolo's blog

Gitweb configuration, the easy way

Posted on: December 28, 2010

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:

http://localhost/git

About these ads
Tags: , ,

2 Responses to "Gitweb configuration, the easy way"

That was way to easy… thanks.

Thanks a lot

in /etc/gitweb.conf edit to something like:
$projectroot = “/home/username/”;

@+

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Twitter Updates

Error: Twitter did not respond. Please wait a few minutes and refresh this page.

Categories

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: