Skip to content

Instantly share code, notes, and snippets.

@victorvhpg
Last active August 29, 2015 14:12
Show Gist options
  • Save victorvhpg/2c7b9531920b01119474 to your computer and use it in GitHub Desktop.
Save victorvhpg/2c7b9531920b01119474 to your computer and use it in GitHub Desktop.
configuracao do apache para o git
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName git.exemplo
DocumentRoot /var/www/git
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
#local onde estao os repositorios git
SetEnv GIT_PROJECT_ROOT /var/www/git/git
#expor todos os repositorios
SetEnv GIT_HTTP_EXPORT_ALL
#qualquer url com caminho /git sera manipulada pelo git-http-backend
ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/
#autenticacao
<Location /git>
AuthType Digest
AuthName "Acesso privado Git"
#o arquivo foi colocado em /var/www/git/ apenas para exemplo
#coloque ele em um local seguro
AuthUserFile /var/www/git/.htpasswd
Require valid-user
</Location>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment