From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id MKevGWwuB18IXgAA0tVLHw (envelope-from ) for ; Thu, 09 Jul 2020 14:49:16 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id yBiqFWwuB1+lLwAA1q6Kng (envelope-from ) for ; Thu, 09 Jul 2020 14:49:16 +0000 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 90DA3940B76 for ; Thu, 9 Jul 2020 14:49:15 +0000 (UTC) Received: from localhost ([::1]:60984 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtXrN-0006l5-6p for larch@yhetil.org; Thu, 09 Jul 2020 10:49:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36816) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jtXrC-0006kz-6y for bug-guix@gnu.org; Thu, 09 Jul 2020 10:49:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58145) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jtXrB-0004mR-UE for bug-guix@gnu.org; Thu, 09 Jul 2020 10:49:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jtXrB-0005kC-Ry for bug-guix@gnu.org; Thu, 09 Jul 2020 10:49:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#26302: Deploying the =?UTF-8?Q?i18n=E2=80=99d?= web site Resent-From: "pelzflorian (Florian Pelz)" Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 09 Jul 2020 14:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26302 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 26302-submit@debbugs.gnu.org id=B26302.159430613822071 (code B ref 26302); Thu, 09 Jul 2020 14:49:01 +0000 Received: (at 26302) by debbugs.gnu.org; 9 Jul 2020 14:48:58 +0000 Received: from localhost ([127.0.0.1]:41458 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtXr8-0005jv-Fa for submit@debbugs.gnu.org; Thu, 09 Jul 2020 10:48:58 -0400 Received: from pelzflorian.de ([5.45.111.108]:59842 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtXr4-0005ji-S2 for 26302@debbugs.gnu.org; Thu, 09 Jul 2020 10:48:57 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id 2568236055C; Thu, 9 Jul 2020 16:48:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1594306133; bh=6rReN0bzz6n7Ou311MIZr+/q4+VWrf3F2A0tEmT0dvs=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=sJHphoDeVthpwYjFRCqVPkrW5faLrgvQBXx+P9+Q8oUkVbleS7ejfWKpmbuI5LfRv gN8bG9m6hT+nTl5/4qbmyY9Jp/wMoDYrmf8hkdcJL8y+8g5u77XXyEmSxQ4Yszq9OC 1stSfjNo1EAZtOl9kqLkXOLwThNDgfHxC0BXlxHA= Date: Thu, 9 Jul 2020 16:48:43 +0200 From: "pelzflorian (Florian Pelz)" Message-ID: <20200709144524.fjri2znqer2dzn7a@pelzflorian.localdomain> References: <20200325232100.ynsy7xog4vt6nq5q@pelzflorian.localdomain> <87sghf6lkv.fsf@gnu.org> <20200407220225.zlw64sywakcajvkt@pelzflorian.localdomain> <20200409032146.tm76qkrwwydfadye@pelzflorian.localdomain> <20200409074550.ecq4ltzvu27o3js3@pelzflorian.localdomain> <20200409145730.qd2nqg4gxrf4ofzw@pelzflorian.localdomain> <878sj43cja.fsf@gnu.org> <20200409173102.gaheruhtp7fg6cgg@pelzflorian.localdomain> <20200705090808.7c7ihjnymo6hv7ch@pelzflorian.localdomain> <87d054bzru.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87d054bzru.fsf@gnu.org> X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniela Lura , 26302 <26302@debbugs.gnu.org>, sirgazil Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=pelzflorian.de header.s=mail header.b=sJHphoDe; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: -0.01 X-TUID: 8bLzFMMT/jkk The trouble is that I do not have an understanding in what order nginx tries which redirections/rewrites. An understanding is needed instead of investigating dead ends and 3rd party nginx modules. What I have done a while ago (the berlin patch for guix-maintenance from my last e-mail contains this): To redirect accesses only to HTML files I had added (nginx-location-configuration (uri "~ (.html|.htm)$") (body (list "try_files $uri /$lang/$uri /$lang/$uri/index.html =404;"))) However, this does not match when nginx redirects URLs like http://guix.gnu.org/graphics/ to the index file http://guix.gnu.org/graphics/index.html For this reason I had added rewrite (.*)/$ $1/index.html; Then it matched. But: > > Still failing: > > > > http://guix.gnu.org/graphics > > > > http://guix.gnu.org/blog/2013/back-from-the-european-lisp-symposium > > > > worked before wip-i18n but stopped working. Hrm. Previously when visiting http://guix.gnu.org/graphics then nginx too looked up the index file http://guix.gnu.org/graphics/index.html This broke. “rewrite (.*)/$ $1/index.html;” had not fixed it. !! I do not know what to do about it. My last change addressed this: On Thu, Jul 09, 2020 at 03:09:57PM +0200, Ludovic Courtès wrote: > "pelzflorian (Florian Pelz)" skribis: > > I found one problem; the nginx locations for redirecting old URLs can > > be given a higher priority via specifying = before the location path. > > One thing that bit me in the past is that regex locations have higher > precedence that other locations, IIRC. Yes, I think this is what happened, the (nginx-location-configuration (uri "~ (.html|.htm)$") (body (list "try_files $uri /$lang/$uri /$lang/$uri/index.html =404;"))) was run before the location /news/gnu-dmd-01-released.html { return 301 /blog/2013/gnu-dmd-01-released; } and therefore no return was performed. Changing it to location = /news/gnu-dmd-01-released.html { return 301 /$lang/blog/2013/gnu-dmd-01-released; } with = in my last described attempt fixed this. Because the location uri does not end in a slash, using = does not make a difference when matching, but gives higher priority. > > I cleared the browser cache, restarted nscd and tested these URLs > > (with a changed /etc/hosts file pointing guix.gnu.org to the VM): > > I guess you could check with “wget -v -O /dev/null” or similar, so you > can be sure there’s no client cache interfering. This is a good idea. In the past I had thought things work when in reality all was broken and it was just cached. > If you don’t have the manual at hand, you can just make sure you’re > getting the expected redirect, even if the end result is 404. You are right, trying to build the manual was pointless. > > Still failing: > > > > http://guix.gnu.org/graphics > > > > http://guix.gnu.org/blog/2013/back-from-the-european-lisp-symposium > > > > worked before wip-i18n but stopped working. Hrm. > What does nginx’s error.log file say? I can only check later, I have deleted my VM because texinfo for building the manual consumed too much disk space. > > http://guix.gnu.org/manual/html_node/Power-management-Services.html > The URL should have been http://guix.gnu.org/manual/html_node/Power-Management-Services.html with capital M. But the old config has the wrong URL as well I think. I have made some wrong changes since my last mail. Will go back and rebuild the VM from my last mail now. With what I currently have redirection explodes http://guix.gnu.org/manual/html_node/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/html_node !! I think this happened too back then. I have not investigated this yet. > I’d be happy to go ahead and deploy this so maybe let’s see and hammer > down those remaining issues and then we can profit! Let us know how we > can help! > > Thanks, > Ludo’. A solution for the two problems I marked with !! might be important. Other than that, I would be very happy if first the berlin patch to guix-maintenance and then after that the wip-i18n branch finally would go to master. Regards, Florian