Created
January 17, 2013 00:54
-
-
Save int128/4552544 to your computer and use it in GitHub Desktop.
Apache configuration for Git backend
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
#!/bin/sh | |
export GIT_PROJECT_ROOT=/home/git/repositories | |
export GIT_HTTP_EXPORT_ALL=1 | |
exec /usr/libexec/git-core/git-http-backend |
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 *:443> | |
SSLEngine on | |
ServerName git.hidetake.org | |
SuexecUserGroup git git | |
DocumentRoot /var/www/git | |
<Location /> | |
Authname "git" | |
Include "/etc/httpd/conf.d/my.conf.auth" | |
Require user someone | |
</Location> | |
# Enable gitweb. | |
<Directory /var/www/git> | |
Require all granted | |
Options +ExecCGI | |
AddHandler cgi-script cgi | |
DirectoryIndex gitweb.cgi | |
</Directory> | |
# Enable git-http-backend. | |
RewriteEngine on | |
RewriteRule ^/.*\.git/.*$ %{DOCUMENT_ROOT}/git-http-backend-wrapper.cgi%{REQUEST_URI} | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment