Hello again,

On Fri 14/08/2015 11:51, Alessandro DE LAURENZIS wrote:
> Dear misc@ readers,
> 
> I'm trying to set up a git server with HTTP as transfer protocol, using
> httpd(8) in base; considering that info on the net are very sparse
> when apache isn't the subject and that I'm completely a newbie of this
> matter, it isn't difficult to understand that I'm a bit lost...
[...]
> The first thing that comes to my mind is: I know that I should set the
> two "environmental" variables GIT_PROJECT_ROOT (to /git I suppose) and
> GIT_HTTP_EXPORT_ALL, but I don't know how to export them to the CGI
> script...

So, if I understand correctly, I need something equivalent to the
"fastcgi_param" setting in nginx:

        location ~ /git(/.*) {
            fastcgi_pass  localhost:9001;
            include       fastcgi_params;
            fastcgi_param SCRIPT_FILENAME     
/usr/lib/git-core/git-http-backend;
            fastcgi_param GIT_HTTP_EXPORT_ALL "";
            fastcgi_param GIT_PROJECT_ROOT    /srv/git;
            fastcgi_param PATH_INFO           $1;
        }

but I'm afraid that httpd(8) doesn't support that... Anybody could
confirm and/or suggest a possible workaround?

I tried to make a sh wrapper around git-http-backend:

        location "/git/*" {
                authenticate with "/git/.htaccess"
                fastcgi socket "/run/slowcgi.sock"
                root "/git/git-http-backend-wrapper"
        }

# cat /var/www/git/git-http-backend-wrapper
#!/bin/sh

GIT_PROJECT_ROOT="/git" GIT_HTTP_EXPORT_ALL="" /cgi-bin/git-http-backend


(of course I copied /bin/sh in /var/www/bin), but it doesn't seem to work...

Thanks in advance for any hints

-- 
Alessandro DE LAURENZIS
[mailto:just22....@gmail.com]
LinkedIn: http://it.linkedin.com/in/delaurenzis

Reply via email to