Package: gitweb
Version: 1:2.1.4-2.1
Severity: wishlist

When using gitweb with apache (2.4.10-10+deb8u3 on jessie), apache
provides 404s by default for gitweb.css, gitweb.js, git-logo.png, and
git-favicon.png if gitweb is accessed through /cgi-bin/gitweb.cgi
instead of /gitweb/gitweb.cgi:

50.159.64.6 - - [22/Dec/2015:00:53:33 -0800] "GET /cgi-bin/gitweb.cgi HTTP/1.1" 
200 5765 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 
Firefox/38.0 Iceweasel/38.5.0"
50.159.64.6 - - [22/Dec/2015:00:53:33 -0800] "GET /cgi-bin/static/gitweb.css 
HTTP/1.1" 404 523 "http://spindle.queued.net/cgi-bin/gitweb.cgi"; "Mozilla/5.0 
(X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.5.0"
50.159.64.6 - - [22/Dec/2015:00:53:33 -0800] "GET /cgi-bin/static/gitweb.js 
HTTP/1.1" 404 522 "http://spindle.queued.net/cgi-bin/gitweb.cgi"; "Mozilla/5.0 
(X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.5.0"
50.159.64.6 - - [22/Dec/2015:00:53:33 -0800] "GET /cgi-bin/static/git-logo.png 
HTTP/1.1" 404 526 "http://spindle.queued.net/cgi-bin/gitweb.cgi"; "Mozilla/5.0 
(X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.5.0"

These things are set as variables in gitweb.cgi and /etc/gitweb.conf
(for example, $javascript = "static/gitweb.js").  Apache2 defaults
to /cgi-bin being an alias to /usr/lib/cgi-bin (defined by
serve-cgi-bin.conf), while the various static files are in
/usr/share/gitweb/static/.  Meanwhile, /gitweb is aliased to
/usr/share/gitweb.

Both access URLs work for the cgi script, but it would be nice if
the styles worked for both by default.  This could be done
by changing the base paths in these variables to "/gitweb/static/"
instead of "static/".  For example,
$javascript = "/gitweb/static/gitweb.js".

I don't know how changing this would affect other web servers, but
it would make apache's default configuration more robust for
people used to using /cgi-bin/ in their browsers.

Reply via email to