Created
April 14, 2014 14:35
-
-
Save schnell18/10653727 to your computer and use it in GitHub Desktop.
nginx working configure to serve gitolite via 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
# enable git smart http transport via gitolite | |
location /git { | |
# turn off gzip as git objects are already well compressed | |
gzip off; | |
# use file based basic authentication | |
auth_basic "Git Repository Authentication"; | |
auth_basic_user_file /opt/git/htpasswd; | |
# common FastCGI parameters are required | |
include fastcgi_params; | |
# strip the CGI program prefix | |
fastcgi_split_path_info ^(/git)(.*)$; | |
fastcgi_param PATH_INFO $fastcgi_path_info; | |
# pass authenticated user login(mandatory) to Gitolite | |
fastcgi_param REMOTE_USER $remote_user; | |
# pass git repository root directory and hosting user directory | |
# these env variables can be set in a wrapper script | |
fastcgi_param GIT_PROJECT_ROOT /opt/repositories; | |
fastcgi_param GITOLITE_HTTP_HOME /home/git; | |
fastcgi_param SCRIPT_FILENAME /opt/git/bin/gitolite-shell; | |
# use Unix domain socket or inet socket | |
#fastcgi_pass unix:/var/run/fcgiwrap.sock; | |
fastcgi_pass 127.0.0.1:8999; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment