From ad87224d6129c125162cd742a04e11a452648ddc Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sat, 6 Oct 2018 14:06:27 -0400 Subject: Add docs for HTTP(s) clone --- git.sr.ht/installation.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'git.sr.ht') diff --git a/git.sr.ht/installation.md b/git.sr.ht/installation.md index ce6527b..b2dd10a 100644 --- a/git.sr.ht/installation.md +++ b/git.sr.ht/installation.md @@ -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; + } -- cgit