Setting up Git / Apache on Windows

Posted by yodaj007 on Super User See other posts from Super User or by yodaj007
Published on 2011-11-26T00:36:07Z Indexed on 2011/11/26 1:55 UTC
Read the original article Hit count: 637

Filed under:
|
|

I'm following this tutorial to set up a personal Git server on Apache on my Windows 7 box. However, when I add the following to my httpd.conf, Apache throws an error when I try to start it. Can anyone assist in fixing whatever is wrong?

SetEnv GIT_PROJECT_ROOT C:/Repositories
SetEnv GIT_HTTP_EXPORT_ALL
ScriptAliasMatch 
    "(?x)^/(.*/(HEAD | 
                    info/refs | 
                    objects/(info/[^/]+ | 
                             [0-9a-f]{2}/[0-9a-f]{38} | 
                             pack/pack-[0-9a-f]{40}.(pack|idx)) | 
                    git-(upload|receive)-pack))$" 
                    "C:/Program Files (x86)/git/libexec/git-core/git-http-backend.exe/$1"

This is a fresh install of Apache. The only other change I've made to the config file is telling Apache to listen on port 9000 (IIS is listening on 80). This is the error from my event logs:

The Apache service named reported the following error: ScriptAliasMatch takes two arguments, a regular expression and a filename .

I tried putting all of the text on one line, like so:

ScriptAliasMatch "(?x)^/(.*/(HEAD | info/refs | objects/(info/[^/]+ | [0-9a-f]{2}/[0-9a-f]{38} | pack/pack-[0-9a-f]{40}.(pack|idx)) | git-(upload|receive)-pack))$" "C:/Program Files (x86)/git/libexec/git-core/git-http-backend.exe/$1"

But nada.

© Super User or respective owner

Related posts about windows-7

Related posts about apache