Issue 494: Jetty CGI servlet for gitweb doesn't serve css or the logo
Status:  Released
Owner: ----
Closed:  Mar 2012
Reported by mike.lifeguard@gmail.com, Mar 13, 2010
Affected Version: 2.1.1.1

What steps will reproduce the problem?
1. Set gitweb.cgi to /path/to/gitweb.cgi
2. Observe that the HTML is served by Jetty, but gitweb-default.css and
gitweb-logo.png are not. No such file exists in the gerrit dir, nor in gitweb.

This can be worked around by configuring your server to handle the requests
successfully before they reach the Jetty server - obviously that shouldn't
be necessary.

Using gitweb 1.7.0.2.

Mar 13, 2010
#1 sop@google.com
The gitweb-default.css and gitweb-logo.png should be
in the same directory as the CGI.  Unfortunately we
don't have a way to override that assumption through
the configuration file.
Status: Accepted
Mar 13, 2010
#2 mike.lifeguard@gmail.com
The css file in the package I've installed puts the cgi in a directory separate from
the cgi. Other setups might have even stranger layouts. The css file is actually
gitweb.css, not gitweb-default.css. Got this working by pointing gitweb.cgi at the
symlink, and making another for the css:

mikelifeguard@binnie:~$ ls -l /usr/share/gitweb/
total 20
-rw-r--r-- 1 root root  115 2010-03-07 19:46 git-favicon.png
-rw-r--r-- 1 root root  207 2010-03-07 19:46 git-logo.png
-rw-r--r-- 1 root root 8379 2010-03-07 19:46 gitweb.css
lrwxrwxrwx 1 root root   10 2010-03-13 21:09 gitweb-default.css -> gitweb.css
lrwxrwxrwx 1 root root   27 2010-03-07 23:09 index.cgi -> /usr/lib/cgi-bin/gitweb.cgi
mikelifeguard@binnie:~$ tail -n 4 /srv/gerrit/etc/gerrit.config 
[gitweb]
    cgi = /usr/share/gitweb/index.cgi
#    cgi = /usr/lib/cgi-bin/gitweb.cgi
#    url = http://mikelifeguard.is-a-geek.net/gitweb

I think this is best solved by simply providing a persistent configuration file -
there's already a feature req for that.

Mar 13, 2010
#3 sop@google.com
Actually, we expect to find gitweb.css on disk, but we
serve it out of a URL called gitweb-default.css, because
we also serve the site header CSS as gitweb-site.css.

Gerrit failed to look in /usr/share/gitweb for these files
when you are using the system-supplied gitweb script.  I'm
fixing that right now.
Mar 13, 2010
#4 sop@google.com
Fixed in I03d470b3be095aaaa98ebf7ef66d5b29e712eb73
Status: Fixed
Labels: FixedIn-2.1.2.1
Mar 27, 2012
#5 sop@google.com
(No comment was entered for this change.)
Status: Released