我在我的服务器上运行 gitweb 和 gitolite:http: //git.jshawl.com/
我在设置git-http-backend
允许匿名克隆时遇到问题。
这是我的虚拟主机文件 ( /etc/apache2/extra/httpd-vhosts.conf
) 的样子:
<VirtualHost *:80>
DocumentRoot "/Users/git/repositories"
ServerName git.jshawl.com
<Directory "/Users/git/repositories">
Options ExecCGI +FollowSymLinks +SymLinksIfOwnerMatch
AllowOverride All
order allow,deny
Allow from all
AddHandler cgi-script cgi
DirectoryIndex gitweb.cgi
</Directory>
<LocationMatch "^/.*/git-receive-pack$">
AuthType Basic
AuthName "Git Access"
Require group committers
</LocationMatch
SetEnv GIT_PROJECT_ROOT /Users/git/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))$" \
/usr/libexec/git-core/git-http-backend/$1
ScriptAlias / /Users/git/repositories/gitweb.cgi/
`
我按照这里的指示进行操作:http: //www.kernel.org/pub/software/scm/git/docs/git-http-backend.html,但一直面临着 502 错误。
我的 apache 错误日志说:[Fri Aug 24 19:29:32 2012] [error] [client 198.228.200.148] client denied by server configuration: /usr/libexec/git-core/git-http-backend
此外,添加所有这些已经取消了我的 gitweb 安装(以前位于http://git.jshawl.com)
我究竟做错了什么?