From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id GHgaFF3BwmJrdgAAbAwnHQ (envelope-from ) for ; Mon, 04 Jul 2022 12:30:53 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id AO0cFF3BwmJzNgAA9RJhRA (envelope-from ) for ; Mon, 04 Jul 2022 12:30:53 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id EAE52290DA for ; Mon, 4 Jul 2022 12:30:52 +0200 (CEST) Received: from localhost ([::1]:39562 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8JLw-0000Oo-5O for larch@yhetil.org; Mon, 04 Jul 2022 06:30:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55148) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8JLA-0000NT-Fs for help-guix@gnu.org; Mon, 04 Jul 2022 06:30:04 -0400 Received: from smtprelay03.ispgateway.de ([80.67.18.15]:45604) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8JL7-0005DI-Pk for help-guix@gnu.org; Mon, 04 Jul 2022 06:30:04 -0400 Received: from [79.252.157.178] (helo=motorball) by smtprelay03.ispgateway.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1o8JLp-0005Yi-Up; Mon, 04 Jul 2022 12:30:46 +0200 From: Simon Streit To: "pelzflorian (Florian Pelz)" Cc: help-guix@gnu.org Subject: Re: Set up cgit with git-http-backend properly References: <87wncvdfh2.fsf@pelzflorian.de> Gcc: nnfolder+archive:sent.2022-07 Date: Mon, 04 Jul 2022 12:29:57 +0200 In-Reply-To: <87wncvdfh2.fsf@pelzflorian.de> (pelzflorian@pelzflorian.de's message of "Sat, 02 Jul 2022 11:35:37 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Df-Sender: bGlzdHNAbmV0cGFuaWMub3Jn Received-SPF: none client-ip=80.67.18.15; envelope-from=simon@netpanic.org; helo=smtprelay03.ispgateway.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1656930653; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=J0kxde7U7bWrsx17f2tOPrSdG8IVWv1mPj9omH5ZU18=; b=iJjYfpz5PuQ/Iomw/S5XJ4TBh5P8wuMbF/Y3yhlvAfoBbF71obPAR95LN3iCfI3bcKL2m+ ApknT9qV/MU/k7U901MoZf2Cg6Zd3q7LR8rkZe1atLjeAiu+qsiiXMYKDn7JohGhdFAH66 UrOG2eJ+Hff8rvnLnaVxTugTJTsMC87EP+ibXzk9r+WpR6sXVFx+Veatbw4c7OCcnALtBy QgPxvIl+OGHNiojz2rOSYTWxYwvF2lpnHT3JWere/yFITrtawGf6xf2wcyi//GmjkDnSif +4+IWRAC6BGLpZCSQpi/MHCtT2fDFR3CCOw6ID17+9D5ncgufHemyAQkGQBsTg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1656930653; a=rsa-sha256; cv=none; b=YOgRHvRjNo8oJo0kCzX7kNoY/7Tyoo56UAORBr+Vk5zUDNQNvgBAYh3p63ImS4McQmYhyj N2HddF6UJBY3PvdKpzG/00RxFfTuZYjNTZo35AO4XXfzhnS6cuzlgaJx0tJ/rjb3Fg2U3p RkUp5u7kwkGmiM7pds5O1lLdZ7u6fJVzX8cOXyMkZln4fVCyZCx3zhULAMoMTHxEVRTcpF T5sG6uyV0MUDPwAuzRI8TIE32dgNN2vZrf/vdh2+ZkbD6H411JHF9Cc8TNdIxMEWUNONMb 8xM+kgHge2z95M7Ba0h1OslMff8ZPGRPtCKkYhWI1nQGavtMIolVG11iWloNog== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.24 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: EAE52290DA X-Spam-Score: -1.24 X-Migadu-Scanner: scn0.migadu.com X-TUID: F6S2UHgo6jj5 Hello Florian, "pelzflorian (Florian Pelz)" writes: > what did you base your setup on? I've been trying to figure it out from the manual and could have found a config snippet months ago while setting it up. It has not worked as expected since. > with uri-path "/git". I think you want "/" though because you have > its own domain. Or maybe you want "". To keep things simple I'm only trying to get it working with =E2=80=98git-http-nginx-location-configuration=E2=80=99 now. So far it app= ears that it only works when =E2=80=98uri-path=E2=80=99 is anything else than "" or "/". Looking at the service definition in =E2=80=98gnu/services/version-contro.s= cm=E2=80=99 "" and "/" are the same the output of nginx' config file. After modifying (string-append "~ /" (string-trim-both uri-path #\/) "(/.*)") to (string-append "~ " (string-trim-both uri-path #\/) "(/.*)") serving and cloning from https://git.example.com/repo(.git) works now. But it doesn't when cgit is enabled and serving repositories in the same path at the same time. Good news is that I'm at a step further now and have it working with: (nginx-server-configuration (server-name '("git.example.com")) (root cgit) (try-files (list "$uri" "@cgit")) (locations (list (nginx-location-configuration (uri "@cgit") (body '("fastcgi_param SCRIPT_FILENAME $document_root/lib/cgit/cgit.cgi= ;" "fastcgi_param PATH_INFO $uri;" "fastcgi_param QUERY_STRING $args;" "fastcgi_param HTTP_HOST $server_name;" "fastcgi_pass 127.0.0.1:9000;"))) (git-http-nginx-location-configuration (git-http-configuration)) (nginx-location-configuration (uri "/.well-known") (body '("root /var/www;"))))) (ssl-certificate "/etc/letsencrypt/live/example.com/fullchain.pem") (ssl-certificate-key "/etc/letsencrypt/live/example.com/privkey.pem")) Though I still rather not keep the URL at =E2=80=98http://git.example.com/git/REPO(.git)=E2=80=99 for cloning. Is there maybe another way around this?