{"thread":{"id":"41662","subject":"Git Smart HTTP using Nginx","startedAt":"2016-03-10T13:13:49Z","lastAt":"2016-03-10T14:07:14Z","messageCount":2,"participants":["Ben Mezger","Dennis Kaarsemaker"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"280553","messageId":"56E1730D.4030603@benmezger.nl","threadId":"41662","inReplyTo":null,"subject":"Git Smart HTTP using Nginx","fromName":"Ben Mezger","fromEmail":"me@benmezger.nl","sentAt":"2016-03-10T13:13:49Z","receivedAt":"2016-03-10T13:13:49Z","isPatch":false,"sender":{"key":"me@benmezger.nl","avatar":null},"body":"Hi all,\n\nThe git-scm.com only uses apache2 as an example of setting Git's Smart\nHTTP, and searching the web for the Nginx's config only gives me old\nconfigs or not-functional configurations. Has anyone managed to get\nSmart HTTP to work with Nginx and could give me a sample of the .conf?\n\nRegards,\n\nBen Mezger\n\n"},{"id":"280557","messageId":"1457618834.11765.12.camel@kaarsemaker.net","threadId":"41662","inReplyTo":"56E1730D.4030603@benmezger.nl","subject":"Re: Git Smart HTTP using Nginx","fromName":"Dennis Kaarsemaker","fromEmail":"dennis@kaarsemaker.net","sentAt":"2016-03-10T14:07:14Z","receivedAt":"2016-03-10T14:07:14Z","isPatch":false,"sender":{"key":"dennis@kaarsemaker.net","avatar":"https://avatars.githubusercontent.com/u/200649?v=4"},"body":"On do, 2016-03-10 at 10:13 -0300, Ben Mezger wrote:\n\n> The git-scm.com only uses apache2 as an example of setting Git's\n> Smart\n> HTTP, and searching the web for the Nginx's config only gives me old\n> configs or not-functional configurations. Has anyone managed to get\n> Smart HTTP to work with Nginx and could give me a sample of the\n> .conf?\n\nThis works for me, using fcgiwrap:\n\n    location ~ ^.*/(HEAD|info/refs|objects/info/.*|git-(upload|receive)-pack)$ {\n        fastcgi_pass unix:/var/run/fcgiwrap.socket;\n        fastcgi_param SCRIPT_FILENAME   /usr/lib/git-core/git-http-backend;\n        fastcgi_param PATH_INFO         $uri;\n        fastcgi_param GIT_PROJECT_ROOT  $repo_root;\n        fastcgi_param REMOTE_USER $remote_user;\n        include fastcgi_params;\n    }\n\n-- \nDennis Kaarsemaker\nhttp://www.kaarsemaker.net\n"}]}