M hg.sr.ht/installation.md => hg.sr.ht/installation.md +18 -0
@@ 34,3 34,21 @@ favorite cron daemon. We recommend the following crontab:
*/20 * * * * hgsrht-periodic
+## HTTP(s) Cloning
+
+hg.sr.ht does not do this for you - you need to wire it up in nginx. Here's an
+example config:
+
+```nginx
+location = /authorize {
+ proxy_pass http://127.0.0.1:5001;
+ proxy_pass_request_body off;
+ proxy_set_header Content-Length "";
+ proxy_set_header X-Original-URI $request_uri;
+}
+
+location ~ ^/[~^][a-z0-9_]+/[a-zA-Z0-9_.-]+/\.hg.*$ {
+ auth_request /authorize;
+ root /var/lib/mercurial;
+}
+```