diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-10-06 14:06:27 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-10-06 14:06:27 -0400 |
commit | ad87224d6129c125162cd742a04e11a452648ddc (patch) | |
tree | f6049facb2a705ad81e559f48cbd2d47a7869912 /git.sr.ht/installation.md | |
parent | 844426d2a27bd4c84988c24f2e08b9ae0d677616 (diff) | |
download | sr.ht-docs-ad87224d6129c125162cd742a04e11a452648ddc.tar.gz |
Add docs for HTTP(s) clone
Diffstat (limited to 'git.sr.ht/installation.md')
-rw-r--r-- | git.sr.ht/installation.md | 20 |
1 files changed, 20 insertions, 0 deletions
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; + } |