cgit and nginx on debian

Thuban thuban at yeuxdelibad.net
Sat Mar 14 09:25:49 CET 2015


Hi,
I am trying to self-host my git repos, but I can't figure how to achieve
this. Yes, there are many tutorials, but no one works in the end.

What I need : 
- Clone over ssh
- Clone over http
- cgit on http://git.mydomain.com

For now, I have installer nginx, cgit and fcgiwrap. I have access to
cgit index page, but as soon as I wan't to go further (click on a repo,
on tree or commit...), it fails. The url seems broken, because i repeat
itself, ie : http://git.mydomain.com/shaarlyp/shaarlyp/tree/

Here is my nginx config : 

    server {
        listen                80;
        server_name localhost;
        index cgit.cgi;

        root                  /usr/share/cgit;
        try_files             $uri @cgit;

        location @cgit {
        include             fastcgi_params;
        fastcgi_param       SCRIPT_FILENAME /usr/lib/cgit/cgit.cgi;
        fastcgi_param       PATH_INFO       $uri;
        fastcgi_param       QUERY_STRING    $args;
        fastcgi_param       HTTP_HOST       $server_name;
        fastcgi_pass        unix:/run/fcgiwrap.socket;
        }
    }

cgit is installed via debian jessie package.

Do you have any recent documentation, or any advice?

Regards,

-- 
Thuban
PubKey : http://yeuxdelibad.net/Divers/thuban.pub


More information about the CGit mailing list