From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 19759 invoked from network); 13 May 2021 19:39:18 -0000 Received: from lists.zx2c4.com (165.227.139.114) by inbox.vuxu.org with ESMTPUTF8; 13 May 2021 19:39:18 -0000 Received: by lists.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 7fb7c38c; Thu, 13 May 2021 19:39:06 +0000 (UTC) Return-Path: <01010179673d4f97-eec6aedf-4248-42ab-bf94-7840bde76b73-000000@us-west-2.amazonses.com> Received: from a27-27.smtp-out.us-west-2.amazonses.com (a27-27.smtp-out.us-west-2.amazonses.com [54.240.27.27]) by lists.zx2c4.com (ZX2C4 Mail Server) with ESMTPS id 9a1d28a0 (TLSv1.2:ECDHE-ECDSA-AES256-SHA384:256:NO) for ; Thu, 13 May 2021 19:39:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=akgkeyco2zintahlew5zq2spgs45n7gw; d=boogie.com; t=1620934742; h=From:Content-Type:Content-Transfer-Encoding:Mime-Version:Subject:Message-Id:Date:To; bh=L4mtQF2OoM/ecwiuuFmMjvKhBaBbFYk76Lwo75O68w4=; b=V4B41OKlALrTvnmB1nuNp4ty97FZ0lopoL8a9HZY9wQZfhfq9CZ5zN+YSzjeSTrI yNXbQg/yIJE2PDpI32d7EaZx0OP8cjPJLsdGK3BsVjhXHnhim9+KEa2tM/meN84SrKV t1LT9BHKiHHa0dvqpLaWguZ5F1EWEP67R/TZtZsI= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=7v7vs6w47njt4pimodk5mmttbegzsi6n; d=amazonses.com; t=1620934742; h=From:Content-Type:Content-Transfer-Encoding:Mime-Version:Subject:Message-Id:Date:To:Feedback-ID; bh=L4mtQF2OoM/ecwiuuFmMjvKhBaBbFYk76Lwo75O68w4=; b=FgYOEbI+0+gA5Dz497FMqqq/dJXB07lpzCr0PE65UnggdiW0AzuxDBfhjWclEWve D+fODlaXNE2b4Qk5fps5M3ZayaRWfYqlQ5OZfgjIScMPalR6QJyHfokAZ5vmyh06fxv iI49n9YNB7ijYCfaAmlHp8dkqs62bpW1YI8zgfTY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=boogie.com; s=mail; t=1620934741; bh=L4mtQF2OoM/ecwiuuFmMjvKhBaBbFYk76Lwo75O68w4=; h=From:Subject:Date:To; b=R/rmMpSpcDtXSEAn1WfgkaW8Wk2xrH1m1COQ674rQuqKybCROnoolqNy06z5kQFqs /oLS69uvWUCHsCGqeZDAbK7L1hdPj8Sq3hHyFJYHj8yJPYDP1GGLEYu66AQTDzZEOk rtogwziccgNjFQL/jXl8Cf+fQNPqniouTLmq0hCU= From: Michael Durian Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.80.0.2.43\)) Subject: Trying to access invalid directory Message-ID: <01010179673d4f97-eec6aedf-4248-42ab-bf94-7840bde76b73-000000@us-west-2.amazonses.com> Date: Thu, 13 May 2021 19:39:02 +0000 To: cgit@lists.zx2c4.com X-Mailer: Apple Mail (2.3654.80.0.2.43) Feedback-ID: 1.us-west-2.yH+Imr6xEDdnhoP9rin548D9U5+OKCrTSN4Lzf5K1J8=:AmazonSES X-SES-Outgoing: 2021.05.13-54.240.27.27 X-BeenThere: cgit@lists.zx2c4.com X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: List for cgit developers and users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: cgit-bounces@lists.zx2c4.com Sender: "CGit" I=E2=80=99m seeing errors like the following appear in my log file: [Thu May 13 12:59:33.740795 2021] [authz_core:error] [pid 67752] [client = 71.237.74.11:57890] AH01630: client denied by server configuration: = /ebs1/git/src, referer: https://git.boogie.com/moca/src/Handset/diff/ I think rather than trying to access /ebs1/git/src, it should be trying = to access /ebs1/git/moca/src. I=E2=80=99m guessing there is a way I can = correct this using macro substitutions, but I=E2=80=99m not sure what = configuration value needs to be adjusted. Here=E2=80=99s what I=E2=80=99m trying to do. I=E2=80=99m using apache = authentication to restrict access to different git areas. Each area has = its own .htpasswd. Basically, if you are trying to access /moca, you = need to authenticate. The same LocationMatch block that handles the = authentication defines REPO_NAME and SCANPATH environment variables that = I then use in the cgitrc file. What should I adjust to keep cgit from = trying to access the wrong filesystem path? Or am I thinking about this = all wrong and should take a different approach completely? Excerpts from my VirtualHost definition: DocumentRoot /ebs1/git AuthType Basic AuthName 'Git Access' AuthUserFile /ebs1/git/moca/.htpasswd Require valid-user Order allow,deny Allow from all # Let cgit know where to search for repositories. # This value is passed to cgitrc where it is used # to for the scan-path variable. SetEnv REPO_NAME moca SetEnv SCANPATH /ebs1/git/moca SetEnv GIT_PROJECT_ROOT /ebs1/git SetEnv GIT_HTTP_EXPORT_ALL ScriptAliasMatch \ "(?x)^/(.*/(HEAD | \ info/refs | \ objects/info/[^/]+ | \ git-(upload|receive)-pack))$" \ /usr/local/libexec/git-core/git-http-backend/$1 # For cgit SetEnv CGIT_CONFIG /ebs1/git/cgit/cgitrc AllowOverride None Options +ExecCGI Require all granted Alias /cgit.png /ebs1/git/cgit/cgit.png Alias /cgit.css /ebs1/git/cgit/cgit.css Alias /favicon.ico /ebs1/git/cgit/favicon.ico ScriptAlias /moca /ebs1/git/cgit/cgit.cgi And here=E2=80=99s my /ebs1/git/cgit/cgitrc enable-http-clone=3D1=20 enable-commit-graph=3D1 enable-log-filecount=3D1 enable-log-linecount=3D1 remove-suffix=3D1 enable-git-config=3D1 clone-url=3Dhttps://git.boogie.com/$REPO_NAME/$CGIT_REPO_URL scan-path=3D$SCANPATH Thanks, mike=