threads / discuss / 41662

Git Smart HTTP using Nginx

Subject: Git Smart HTTP using Nginx

## tl;dr

2 messages between Mar 10, 2016 and Mar 10, 2016.

replies: 1people: 2as markdown or json

Ben Mezger· Mar 10, 2016, 13:13 UTC · lore
Hi all,

The git-scm.com only uses apache2 as an example of setting Git's Smart HTTP, and searching the web for the Nginx's config only gives me old configs or not-functional configurations. Has anyone managed to get Smart HTTP to work with Nginx and could give me a sample of the .conf?

Regards,
Ben Mezger
Dennis Kaarsemaker· Mar 10, 2016, 14:07 UTC · re: Ben Mezger · lore

Re: Git Smart HTTP using Nginx

On do, 2016-03-10 at 10:13 -0300, Ben Mezger wrote:
Show 6 quoted lines
> The git-scm.com only uses apache2 as an example of setting Git's
> Smart
> HTTP, and searching the web for the Nginx's config only gives me old
> configs or not-functional configurations. Has anyone managed to get
> Smart HTTP to work with Nginx and could give me a sample of the
> .conf?
This works for me, using fcgiwrap:
    location ~ ^.*/(HEAD|info/refs|objects/info/.*|git-(upload|receive)-pack)$ {
        fastcgi_pass unix:/var/run/fcgiwrap.socket;
        fastcgi_param SCRIPT_FILENAME   /usr/lib/git-core/git-http-backend;
        fastcgi_param PATH_INFO         $uri;
        fastcgi_param GIT_PROJECT_ROOT  $repo_root;
        fastcgi_param REMOTE_USER $remote_user;
        include fastcgi_params;
    }
-- 
Dennis Kaarsemaker
http://www.kaarsemaker.net

← back to recent threads