~sircmpwn/sr.ht-docs

ad87224d6129c125162cd742a04e11a452648ddc — Drew DeVault 2 years ago 844426d
Add docs for HTTP(s) clone
1 files changed, 20 insertions(+), 0 deletions(-)

M git.sr.ht/installation.md
M git.sr.ht/installation.md => git.sr.ht/installation.md +20 -0
@@ 41,3 41,23 @@ You must also configure `git-srht-periodic` to run periodically with your
favorite cron daemon. We recommend the following crontab:

    */20 * * * * git-srht-periodic

## HTTP(s) Cloning

git.sr.ht does not do this for you - you need to wire it up in nginx. Here's an
example config:

    location ~ ^.*/objects/([0-9a-f]+/[0-9a-f]+|pack/pack-[0-9a-f]+.(pack|idx)).*$ {
        root /var/lib/git;
    }

    location ~ ^.*/(HEAD|info/refs|objects/info/.*|git-(upload|receive)-pack).*$ {
        root /var/lib/git;
        fastcgi_pass unix:/run/fcgiwrap.sock;
        fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
        fastcgi_param PATH_INFO $uri;
        fastcgi_param GIT_PROJECT_ROOT $document_root;
        fastcgi_param GIT_HTTP_EXPORT_ALL "";
        include fastcgi_params;
        gzip off;
    }