2012-10-06 49 views
21

由服務器配置拒絕我使用Apache 2.4客戶端試圖使用git-HTTP-backend.exe

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天設置飯桶。我沒有想到這很難。

回答

37

你應該改變你的配置相匹配的Apache 2.4的需求:

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

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

+0

偉大的..你救了我的生活和時間.. – kreamik

+0

怪異雖然。文檔(鏈接)指出存在兼容模塊access_compat.load,但即使啓用了此功能,仍需要修改目錄語句。 (至少在我的情況下),否則它不會工作! –

+0

我遵循[本教程](http://www.diggin-data.de/website/post/37-Installing+Git+http-backend+on+Windows+with+XAMPP)注意到2.4之前的方式;你的答案,以及關於從[那個教程](http://www.oudmaijer.com/2011/07/19/git-server-on)複製* libiconv-2.dll *到* git-core *的評論-windows /)讓我的設置準備好了。 –