Setting up Gitweb on OpenBSD

Here are the steps I had to take to setup Gitweb on OpenBSD.

ratbert$ sudo pkg_add /usr/ports/packages/i386/all/git-1.7.3.5.tgz
ratbert$ sudo cp -pR /usr/local/share/gitweb/static /var/www/htdocs/gitweb
ratbert$ sudo cp -p /usr/local/share/gitweb/gitweb.cgi /var/www/cgi-bin/
ratbert$ cat > /tmp/foobar << EOF > # /etc/gitweb.conf
>
> # core git executable to use
> # this can just be "git" if your webserver has a sensible PATH
> $GIT = "/usr/local/bin/git";
> # absolute fs-path which will be prepended to the project path
> $projectroot = "/usr/src/git";
> $projects_list = $projectroot;
> # html text to include at home page
> $home_text = "indextext.html";
> # URI of stylesheets
> @stylesheets = ("/gitweb/gitweb.css");
> # URI of GIT logo (72x27 size)
> $logo = "/gitweb/git-logo.png";
> # URI of GIT favicon, assumed to be image/png type
> $favicon = "/gitweb/git-favicon.png";
> # URI of gitweb.js (JavaScript code for gitweb)
> $javascript = "/gitweb/gitweb.js";
> # enable human readable URLs
> #$feature{'pathinfo'}{'default'} = [1];
> EOF
ratbert$ sudo install -m 0644 -o root -g wheel /tmp/foobar /etc/gitweb.conf
ratbert$ rm -f /tmp/foobar
ratbert$

  • laual

    Hi Fernando, could you maybe elaborate a bit on your httpd.conf? Or are you running this setup with Apache? Thanks.