3

I'm running GitWeb on Windows Server 2008 R2 using Apache 2.2.22 (win64). I followed the instructions here: https://git.wiki.kernel.org/index.php/MSysGit:GitWeb The instructions say that we should use the msysgit version of perl as the first line of perl in the gitweb.cgi script.

GitWeb works, but it is extremely slow, taking around 10 seconds for a page to load. What I noticed was that even if I write a "Hello World" script using msysgit's version of Perl as the first line, Apache is slow to execute that as well. However, if change to a different version of Perl, such as cygwin's perl (C:/cygwin/bin/perl), it is fast again. I can't get gitweb.cgi to execute using any other type of perl besides msysgit, because when I do, I get an "Projects Not Found" error.

user64141
  • 5,141
  • 4
  • 37
  • 34

2 Answers2

3

After several hours, I found an alternative solution. Instead of using msysgit's version of git and perl, we are going to use cygwin's:

1) Install Cygwin, and choose the following cygwin packages: git (and perl if necessary)

2) Modify the gitweb.cgi file in 3 places.
The first line of gitweb.cgi should say:

#!C:/cygwin/bin/perl

Make sure the $GIT variable is set properly, and in "cygwin" format:

our $GIT = "C:/cygwin/bin/git";

The projectroot directory must be in "cygwin" format, not msysgit format:

our $projectroot = "/cygdrive/c/temp/repos";

For some reason, cygwin's version of perl executes much faster under apache than the one under msysgit.

user64141
  • 5,141
  • 4
  • 37
  • 34
0

Just add next line in httpd.conf

SetEnv LOGONSERVER \machine

Leanid
  • 1