1

I'm trying to give gitweb a try, but I'm failing to get it to work.

On Ubuntu Server 13.10 (saucy), I ran apt-get update, then apt-get install gitweb.

...
Unpacking gitweb (from .../gitweb_1%3a1.8.3.2-1_all.deb) ... Selecting previously unselected package libhttp-date-perl. Unpacking libhttp-date-perl (from .../libhttp-date-perl_6.02-1_all.deb) ... Processing triggers for man-db ... Setting up gitweb (1:1.8.3.2-1) ...
* Reloading web server apache2                                                                                                                                                                                                               * Setting up libhttp-date-perl (6.02-1) ...
#

The package did generate the proper files needed for the install:

# cat /etc/apache2/conf.d/gitweb
Alias /gitweb /usr/share/gitweb

<Directory /usr/share/gitweb>
  Options FollowSymLinks +ExecCGI
  AddHandler cgi-script .cgi
</Directory>

The file /etc/gitweb.conf is also generated.

However, even after an apache2ctrl restart(which was already done by apt-get, but anyway) I'm unable to access http://localhost/gitweb. From access.log:

10.0.10.175 - - [29/Dec/2013:15:14:19 +0100] "GET /gitweb HTTP/1.1" 404 495 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36"
127.0.0.1 - - [29/Dec/2013:15:18:27 +0100] "GET /gitweb/ HTTP/1.1" 404 495 "-" "ELinks/0.12~pre6-1ubuntu1 (textmode; Ubuntu; Linux 3.11.0-14-generic x86_64; 237x71-2)"

I'm hosting Mediawiki and phppgadmin on the server (also installed with apt-get), and these work without an issue.

Any clue?

3
  • What about your /etc/gitweb.conf file ? Dec 29, 2013 at 14:45
  • By the way, for questions which may be specific to an Ubuntu packaged version of a piece of software, you can try askubuntu.com. Dec 29, 2013 at 15:00
  • Do you see a symbolic link in /etc/apache2/sites-enabled/ for gitweb ?
    – janos
    Dec 29, 2013 at 18:25

1 Answer 1

3

OK found a hint to the solution on http://lintian.debian.org/tags/apache2-reverse-dependency-uses-obsolete-directory.html.

Apparently the gitweb package is using the -for Apache 2.4- obsolete /etc/apache2/conf.d/ directory. Renaming/moving to the proper dir:

# mv /etc/apache2/conf.d/gitweb /etc/apache2/conf-available/gitweb.conf
# a2enconf
Your choices are: charset gitweb javascript-common localized-error-pages mediawiki other-vhosts-access-log security serve-cgi-bin
Which conf(s) do you want to enable (wildcards ok)?
gitweb
Enabling conf gitweb.
To activate the new configuration, you need to run:
  service apache2 reload
# apache2ctl restart
AH00526: Syntax error on line 4 of /etc/apache2/conf-enabled/gitweb.conf:
Either all Options must start with + or -, or no Option may.
Action 'restart' failed.
The Apache error log may have more information.
# vi /etc/apache2/conf-enabled/gitweb.conf
# apache2ctl restart

Apparently FollowSymlinks must be preceded by a "+". After changing that part, the install works.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .