📄 nginx.conf
worker_processes  1;

error_log  /tmp/nginx-error.log;
pid /tmp/nginx.pid;

events {
    worker_connections  1024;
}

http {
    server {
        listen  *:80;

        server_name $hostname;

        location ~ (^/\w+\.git/.*) {
            # Set chunks to unlimited, as the bodies can be huge
            client_max_body_size            0;

            fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
            include fastcgi_params;
            fastcgi_param GIT_HTTP_EXPORT_ALL "0";
            fastcgi_param GIT_PROJECT_ROOT /git;
            fastcgi_param PATH_INFO $1;
            fastcgi_pass unix:/var/run/fcgiwrap/fcgiwrap.socket;
        }
    }
}