配置http访问站点
配置git
# git config
SetEnv GIT_PROJECT_ROOT D:/repository/git_project
SetEnv GIT_HTTP_EXPORT_ALL
ScriptAliasMatch \
"(?x)^/(.*/(HEAD | \
info/refs | \
objects/(info/[Apache Git server on Windows^/]+ | \
[0-9a-f]{2}/[0-9a-f]{38} | \
pack/pack-[0-9a-f]{40}\.(pack|idx)) | \
git-(upload|receive)-pack))$" \
"C:/vcs/Git/libexec/git-core/git-http-backend.exe/$1"
<Directory "C:/vcs/Git/libexec/git-core/">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
#enable read/write access
<Location />
AuthType Basic
AuthName "Git"
AuthUserFile D:/my_tool/Apache2.2/passwd.git
Require valid-user
</Location>
# config gitweb
Alias /gitweb "C:/vcs/Git/share/gitweb"
<Directory "C:/vcs/Git/share/gitweb/">
AddHandler cgi-script .cgi
<Files ~ "\.cgi$">
Options +ExecCGI
</Files>
AllowOverride None
Order allow,deny
Allow from all
DirectoryIndex gitweb.cgi
</Directory>