Skip to content

Instantly share code, notes, and snippets.

@sio4
Created December 17, 2014 02:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sio4/61fc3d0331304daaa897 to your computer and use it in GitHub Desktop.
Save sio4/61fc3d0331304daaa897 to your computer and use it in GitHub Desktop.
server {
...
# git via nginx ------------------------------------------------------
location ~ /git(/.*) {
auth_basic "";
auth_basic_user_file /var/git/.htpasswd;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
fastcgi_param GIT_HTTP_EXPORT_ALL "";
fastcgi_param GIT_PROJECT_ROOT /var/git;
fastcgi_param PATH_INFO $1;
include fastcgi_params;
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment