Created
January 19, 2012 01:17
-
-
Save byplayer/1636976 to your computer and use it in GitHub Desktop.
gitweb + git smart http
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SetEnv GIT_PROJECT_ROOT /usr/local/var/data | |
SetEnv GIT_HTTP_EXPORT_ALL | |
SetEnv REMOTE_USER $REDIRECT_REMOTE_USER | |
SetEnv GITWEB_CONFIG | |
<LocationMatch "^/git/.*/git-receive-pack$"> | |
AuthType Basic | |
AuthName "Git Access" | |
# TODO LDAP Auth | |
AuthUserFile /usr/local/var/data/git/.htpasswd | |
Require valid-user | |
</LocationMatch> | |
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" | |
# Anything not matched above goes to displayable gitweb interface | |
ScriptAlias /git /usr/share/gitweb/gitweb.cgi/ | |
Alias /static/ /usr/share/gitweb/static/ | |
<Location /git> | |
SSLRequireSSL | |
</Location> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment