23

我使用 apache 2.4

Sat Oct 06 15:25:47.948789 2012] [authz_core:error] [pid 7580:tid 1232] [client 192.168.100.252:10153] AH01630: client denied by server configuration: C:/Program Files (x86)/Git/libexec/git-core/git-http-backend.exe

这是我的配置

<Directory "C:\git-server">
Options +ExecCGI
Allow from all
</Directory>

 <VirtualHost *:80>
  DocumentRoot  "C:/git-server"
   ServerName ****
  DirectoryIndex index.php

SetEnv GIT_PROJECT_ROOT c:/git-server
SetEnv GIT_HTTP_EXPORT_ALL
SetEnv REMOTE_USER=$REDIRECT_REMOTE_USER
ScriptAlias /git/ "C:/Program Files (x86)/Git/libexec/git-core/git-http-backend.exe/$1"


<LocationMatch "^/.*/git-receive-pack$">
Options +ExecCGI
AuthType Basic
AuthName intranet
AuthUserFile "C:/git-server/config/users"
Require valid-user
</LocationMatch>

<LocationMatch "^/.*/git-upload-pack$">
Options +ExecCGI
AuthType Basic
AuthName intranet
AuthUserFile "C:/git-server/config/users"
Require valid-user
</LocationMatch>


</VirtualHost>

我正在尝试 2 天来设置 git。我没想到会这么难。

4

1 回答 1

39

您应该更改配置以匹配 Apache 2.4 的需求:

<Directory "C:\git-server">
Options +ExecCGI
Require all granted
</Directory>

来源:http ://httpd.apache.org/docs/2.4/upgrading.html#access

于 2012-11-06T19:48:49.983 回答