GitWeb is very slow under Apache on Windows using MSysgit Perl intrepretor

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

GitWeb works, but it is very slow, takes about 10 seconds to load the page. I noticed that even if I write a "Hello World" script using the MSysgit Perl version as the first line, Apache doesn't execute it either. However, if you downgrade to another version of Perl like cygwin perl (C: / cygwin / bin / perl), it works fast again. I cannot run gitweb.cgi using any other type of perl besides msysgit, because when I do, I get a "Projects Not Found" error.

+3


source to share


2 answers


After a few hours, I found an alternative solution. Instead of using the msysgit version of git and perl, we will use cygwin's:

1) Install Cygwin and select the following cygwin packages: git (and perl if needed)

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 correctly 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, the cygwin version of perl runs faster than apache than msysgit.

+3


source


Just add the following line to httpd.conf



SetEnv LOGONSERVER \ machine

0


source







All Articles