Skip to content

Instantly share code, notes, and snippets.

@kierdwyn
kierdwyn / server-git.conf
Last active Jul 18, 2019 — forked from massar/server-git.conf
Nginx git smart http protocol (git-http-backend) configuration with basic authentication. Need the support of fcgiwrap.
View server-git.conf
# Example nginx + git HTTP Smart mode (git-http-backend) + HTTP Authentication + HTTPS redirect
# Forked from jeroen@massar.ch - http://jeroen.massar.ch
# Preparation: you need to install and configure fcgiwrap and set it to listen at fcgiwrap.socket.
# An example tutorial: https://www.howtoforge.com/serving-cgi-scripts-with-nginx-on-centos-6.0-p2
# A useful hint: add -f as a parameter to fcgiwrap to redirect the cgi errors to your nginx error log.
server {
listen 80;
server_name git.example.com;