git on HTTP with gitolite and nginx

Solution 1:

Here is what I set in my Apache config (I know: not nginx, but still can help you):

SetEnv GIT_PROJECT_ROOT @H@/repositories
SetEnv GIT_HTTP_EXPORT_ALL
SetEnv GITOLITE_HTTP_HOME @H@
ScriptAlias /hgit/ @H@/gitolite/bin/gl-auth-command/
SetEnv GIT_HTTP_BACKEND "@H@/usr/local/apps/git/libexec/git-core/git-http-backend"

(with @H@ the path where .gitolite.rc and, in my case, the repositories are stored)

I don't see GITOLITE_HTTP_HOME and GIT_HTTP_BACKEND defined in your config.
See the full config here.