Last active
August 29, 2015 14:12
-
-
Save victorvhpg/2c7b9531920b01119474 to your computer and use it in GitHub Desktop.
configuracao do apache para o git
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
<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