Submitted by lewisjenkins on Mon, 06/11/2012 - 07:48
When adding a Git repository to a domain, the image and stylesheet paths in gitweb.cgi are referencing a directory 'static' that doesn't exist, which breaks the design and layout when browsing the repository.
File: gitweb.cgi
our @stylesheets = ("static/gitweb.css");
our $logo = "static/git-logo.png";
our $favicon = "static/git-favicon.png";
our $javascript = "static/gitweb.js";
Removing 'static' fixes the problem. See below:
our @stylesheets = ("gitweb.css");
our $logo = "git-logo.png";
our $favicon = "git-favicon.png";
our $javascript = "gitweb.js";
-
Lewis
Status:
Closed (fixed)
Comments
Submitted by JamieCameron on Mon, 06/11/2012 - 09:16 Comment #1
Do either of the files
/var/www/git/gitweb.cgi
or/usr/lib/cgi-bin/gitweb.cgi
exist on your system? Virtualmin copies those files to each domain's git directory, if they exist ... so the incorrectstatic
path could be coming from there.Submitted by lewisjenkins on Mon, 06/11/2012 - 11:15 Comment #2
Yes, I have /var/www/git/gitweb.cgi and there is also a /var/www/git/static directory. So in that context, the 'static' directory makes sense.
However, when copied to the virtual server, the contents of the 'static' directory (the images, css and js) are in the same directory as gitweb.cgi, with no 'static' folder.
Should I manually change the paths / create the static folder each time I create a new repository?
Submitted by JamieCameron on Tue, 06/12/2012 - 08:51 Comment #3
If you rename or delete that gitweb.cgi file and then disable and re-enable git for a domain, Virtualmin should fall back to using its own built-in copy of gitweb.cgi. Does that have the same problem on your system?
Submitted by lewisjenkins on Thu, 06/14/2012 - 16:32 Comment #4
That is now working correctly.
1) I renamed /var/www/git/gitweb.cgi
2) I disabled and re-enabled git
3) The file created at /home/domain/public_html/git/gitweb.cgi seems to be a different version than I had previously, which I assume is the Virtualmin built-in copy that you mention.
Thanks for your help!
Submitted by JamieCameron on Fri, 06/15/2012 - 09:18 Comment #5
Great - I will have Virtualmin automatically avoid using the centos-supplied gitweb.cgi when it uses incorrect paths in future.