From unknown Fri Aug 15 20:47:15 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#28560 <28560@debbugs.gnu.org> To: bug#28560 <28560@debbugs.gnu.org> Subject: Status: [PATCH] web: Add try-files for the nginx-service-type. Reply-To: bug#28560 <28560@debbugs.gnu.org> Date: Sat, 16 Aug 2025 03:47:15 +0000 retitle 28560 [PATCH] web: Add try-files for the nginx-service-type. reassign 28560 guix-patches submitter 28560 Oleg Pykhalov severity 28560 normal tag 28560 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 22 20:38:57 2017 Received: (at submit) by debbugs.gnu.org; 23 Sep 2017 00:38:57 +0000 Received: from localhost ([127.0.0.1]:53348 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dvYTA-0004tY-QE for submit@debbugs.gnu.org; Fri, 22 Sep 2017 20:38:57 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37503) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dvYT9-0004tL-4P for submit@debbugs.gnu.org; Fri, 22 Sep 2017 20:38:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dvYT2-00079f-PI for submit@debbugs.gnu.org; Fri, 22 Sep 2017 20:38:49 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:43233) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dvYT2-00079a-Lw for submit@debbugs.gnu.org; Fri, 22 Sep 2017 20:38:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56656) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dvYT1-0003ak-A9 for guix-patches@gnu.org; Fri, 22 Sep 2017 20:38:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dvYT0-00077z-Bl for guix-patches@gnu.org; Fri, 22 Sep 2017 20:38:47 -0400 Received: from mail-lf0-x231.google.com ([2a00:1450:4010:c07::231]:45401) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dvYSw-00075S-KJ; Fri, 22 Sep 2017 20:38:42 -0400 Received: by mail-lf0-x231.google.com with SMTP id d17so2498472lfe.2; Fri, 22 Sep 2017 17:38:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version; bh=Te6qBm1mSjBLVg/ofEN2mfmthG379HAidTLQUrZxs1Q=; b=TzYSC1cw7DUKZzolKQpdD2y7GZsv0LDqvEVGePy05lxac6q4qMV+FnyhHVBP2XYXDV +yBrYMdXeZ60ZDQ6rwCutxx4I75iINaY8GHlzuRwbLc/dgBLrWTRKoXD1raEYePbukm7 WoONaAhjBEXwOvlQaI8HgGa/CVEdm98U9OhePoPfCnurUvbAIrHweTVXNB75R6mHkZcI HUE4+UUhOj1GSyu/3rR1vL+woh2w1lhShjPWNCaHU/Lk6XPuwf0MhzW2R8FiaSLTokmD rbnVst2pK6ZCkqz53I81zDuaf2wHgdzqhiC9UIlpBYzlhsA4kmp8h9t6RN0OmZ9Kme2i sgIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version; bh=Te6qBm1mSjBLVg/ofEN2mfmthG379HAidTLQUrZxs1Q=; b=RMJo6GKJL+oiCH+u1ON+MIQxe3EL3frY7UckO0dowiuc5S96Ffe9WPW+Kjcz8CaVuy qt4NY4QvqW6rV9gD38tSHJK00pIZdjz0MIW1W9xEWtePXTrcxeyy8enMa6WFDr40mvyh XrIu1a3td2h8S+QvpPaC03R/51Dv9ED1EKnq7fOoK57YnKI0hw7bxQY5R2IEL7kYW3+H A31SoE5nB3PFRKfwCwy9XnTe1M6NkwPiC1QUV8Y7pgcA5XoiCTQGAN/H52YAlfJFe6/W qmmacnz6P7rMw1/Jk7RRZrDylKAVqggSFcrQ4aEkcu2k1wBEFnLKU+lPcETz+YEjAKbY BTQg== X-Gm-Message-State: AHPjjUjdxEUZHFhvwAq250ehl5sRGkeXgvKeR42n7hO93YeOVTqLGmMo uA+awgLE4Wey/EnJRSgathQ9FA== X-Google-Smtp-Source: AOwi7QBilOUqVXoGSlB4QD/VPRvrnQqwx82enZLmPBDjlWSwlrFOw3nc2XdSL4TliuIhApKSMKXrCg== X-Received: by 10.25.83.213 with SMTP id h82mr250033lfl.196.1506127120840; Fri, 22 Sep 2017 17:38:40 -0700 (PDT) Received: from magnolia ([94.142.26.165]) by smtp.gmail.com with ESMTPSA id 126sm186804ljj.9.2017.09.22.17.38.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Sep 2017 17:38:40 -0700 (PDT) From: Oleg Pykhalov To: guix-patches@gnu.org Subject: [PATCH] web: Add try-files for the nginx-service-type. Date: Sat, 23 Sep 2017 03:38:39 +0300 Message-ID: <874lruckq8.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , Christopher Baines X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --=-=-= Content-Type: text/plain Hello Christopher, I'm working with Ludovic on adding Cgit service to GuixSD as an extension of Nginx service. To do this I follow https://wiki.archlinux.org/index.php/Cgit#Using_fcgiwrap where try_files present in example. What do you think? https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28283#14 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-web-Add-try-files-for-the-nginx-service-type.patch Content-Description: [PATCH] web: Add try-files for the nginx-service-type. >From 16acb7e5298b21a3c40207e1719248eaa5698d50 Mon Sep 17 00:00:00 2001 From: Oleg Pykhalov Date: Sat, 23 Sep 2017 03:27:49 +0300 Subject: [PATCH] web: Add try-files for the nginx-service-type. * gnu/services/web.scm (): Add try-files. (emit-nginx-server-config): Add this. --- gnu/services/web.scm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gnu/services/web.scm b/gnu/services/web.scm index 4aa6fd501..c03b1da5c 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -99,6 +99,8 @@ (default '())) (index nginx-server-configuration-index (default (list "index.html"))) + (try-files nginx-server-configuration-try-files + (default '())) (ssl-certificate nginx-server-configuration-ssl-certificate (default "/etc/nginx/cert.pem")) (ssl-certificate-key nginx-server-configuration-ssl-certificate-key @@ -179,6 +181,7 @@ of index files." (nginx-server-configuration-ssl-certificate-key server)) (root (nginx-server-configuration-root server)) (index (nginx-server-configuration-index server)) + (try-files (nginx-server-configuration-try-files server)) (server-tokens? (nginx-server-configuration-server-tokens? server)) (locations (nginx-server-configuration-locations server))) (define-syntax-parameter <> (syntax-rules ())) @@ -207,6 +210,11 @@ of index files." (and/l ssl-certificate-key " ssl_certificate_key " <> ";\n") " root " root ";\n" " index " (config-index-strings index) ";\n" + (if (not (nil? (config-index-strings try-files))) + (string-append " try_files " + (config-index-strings try-files) + ";\n") + "") " server_tokens " (if server-tokens? "on" "off") ";\n" "\n" (map emit-nginx-location-config locations) -- 2.14.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 23 17:54:13 2017 Received: (at 28560) by debbugs.gnu.org; 23 Sep 2017 21:54:13 +0000 Received: from localhost ([127.0.0.1]:54990 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dvsNI-0000g2-UN for submit@debbugs.gnu.org; Sat, 23 Sep 2017 17:54:13 -0400 Received: from mail-lf0-f53.google.com ([209.85.215.53]:45205) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dvsNH-0000fn-HC for 28560@debbugs.gnu.org; Sat, 23 Sep 2017 17:54:11 -0400 Received: by mail-lf0-f53.google.com with SMTP id d17so3781941lfe.2 for <28560@debbugs.gnu.org>; Sat, 23 Sep 2017 14:54:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-transfer-encoding; bh=+VColU8cKil+q5N1zXZCsjKl1RF0begEmwN3WQeQlts=; b=M3D1IEQErSCcWe1XI53ukxyjnNclG4uz/H8A66EY7v+vcikdc2RTh45hUCHLqz4dM0 tJQuSROPVC0sM0B6DTq7S7CZ4w0mhvuSlJk6OCdKApTWPf0fEQXrigVPYb3vaMwnXA+3 2pt41Ej0s/aAqOAmav/xzSH73dtgXDbUXRGpaDqkI+9QzhiX7FO4OiLR+FwmOWvfCc9X DvryU2gvq70mo7Zu+VIoGlpZ7t0LlyVTiFKGcb1SsDxC6JrszDz1Jb11aJVpvqaHqqEY Y1jFOHS4A5szyX5NW9WaZbC9D+di575KRb0dv1YL1R26EPCjNx+RAfQURYEhoni7+5nA 5/mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=+VColU8cKil+q5N1zXZCsjKl1RF0begEmwN3WQeQlts=; b=gSg2SW7BiNreauPCy+N5aGrsUEj6edPPPanNKvZ32SUn+TmB33wO9xPK6IaVzi6+uZ FdkWrdUK50bR+eeSMhmhIEOS+q60Z4JIGJnTeZwuvULcPy+0DLuAhlShjCcg2vKate0H heZ6EFxdyotM67uLwdAR6IEKPGsiOQZL5Hm85VT1Fk+bduwEWcUQ3vxcsWacto3//FuH 4eM/usuaYnFtzlj6O7yPG5Hw8BvWqjUyL+YtGsogBC0T57PBSsZrjHafoJO/tOIXT/KX /mSoeMQLWNx513u/+Ngy85SK7k3ybE8/Ga/+CdWRASHH6l4aKUUl/cZjBjTcFZXLbMrd B4aQ== X-Gm-Message-State: AHPjjUgvb3Y/vEUAlRD7y+zEVZkHPbZaZG1wcZ3MG+P53VOqn7oW5II2 mKEa+I/XHOsgMn9+mcE6SHqpPA== X-Google-Smtp-Source: AOwi7QCjlFA8k9fT5u77Md3dG1aVsuJ6KUZS/urLEGdqzwWs27zYv8UzhONbA5WcINpuwxNm+B9pIA== X-Received: by 10.46.80.77 with SMTP id v13mr1153090ljd.101.1506203645223; Sat, 23 Sep 2017 14:54:05 -0700 (PDT) Received: from magnolia ([178.70.247.167]) by smtp.gmail.com with ESMTPSA id a139sm434941lfa.39.2017.09.23.14.54.04 for <28560@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 23 Sep 2017 14:54:04 -0700 (PDT) From: Oleg Pykhalov To: 28560@debbugs.gnu.org Subject: Re: [bug#28560] [PATCH] web: Add try-files for the nginx-service-type. References: <874lruckq8.fsf@gmail.com> Date: Sun, 24 Sep 2017 00:54:03 +0300 In-Reply-To: <874lruckq8.fsf@gmail.com> (Oleg Pykhalov's message of "Sat, 23 Sep 2017 03:38:39 +0300") Message-ID: <87k20prshw.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 28560 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) Ah, actually I need also to test on real system config before pushed a patc= h. Sorry. --8<---------------cut here---------------start------------->8--- natsu@magnolia ~/src/guix$ ./pre-inst-env guix system build ~/dotfiles/guix= /system-magnolia.scm=20 Backtrace: In srfi/srfi-1.scm: 592:29 19 (map1 (#< type: #= =E2=80=A6)) 592:29 18 (map1 (#< type: #= =E2=80=A6)) 592:29 17 (map1 (#< type: #= =E2=80=A6)) 592:29 16 (map1 (#< type: #=E2=80=A6>= =E2=80=A6)) 592:29 15 (map1 (#< type: #= =E2=80=A6)) 592:29 14 (map1 (#< type: #= =E2=80=A6)) 592:29 13 (map1 (#< type: #= =E2=80=A6)) 592:29 12 (map1 (#< type: #= =E2=80=A6)) 592:29 11 (map1 (#< type: #= =E2=80=A6)) 592:29 10 (map1 (#< type: #= =E2=80=A6)) 592:29 9 (map1 (#< type: #= =E2=80=A6)) 592:29 8 (map1 (#< type: #= =E2=80=A6)) 592:29 7 (map1 (#< type: #= =E2=80=A6)) 592:17 6 (map1 (#< type: #= =E2=80=A6)) In gnu/services/web.scm: 317:21 5 (nginx-shepherd-service _) 308:35 4 (nginx-action . _) 256:10 3 (default-nginx-config # =E2=80=A6) In srfi/srfi-1.scm: 592:17 2 (map1 (#< http-port: 19418=E2=80= =A6>)) In gnu/services/web.scm: 214:9 1 (emit-nginx-server-config _) In unknown file: 0 (string-append " try_files " (("$uri" " ") (# #)) #) ERROR: In procedure string-append: ERROR: In procedure string-append: Wrong type (expecting string): (("$uri" = " ") ("@cgit" " ")) --8<---------------cut here---------------end--------------->8--- From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 23 18:13:23 2017 Received: (at 28560) by debbugs.gnu.org; 23 Sep 2017 22:13:23 +0000 Received: from localhost ([127.0.0.1]:54994 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dvsfr-00019U-Hy for submit@debbugs.gnu.org; Sat, 23 Sep 2017 18:13:23 -0400 Received: from mail-lf0-f49.google.com ([209.85.215.49]:53552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dvsfp-00019G-2a for 28560@debbugs.gnu.org; Sat, 23 Sep 2017 18:13:21 -0400 Received: by mail-lf0-f49.google.com with SMTP id k9so3782648lfe.10 for <28560@debbugs.gnu.org>; Sat, 23 Sep 2017 15:13:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=QTFIEUU5eHmrOFc1JVOGTzUrxPq8WYdHKs+aZJ15rEE=; b=YZMSe4dRVwJ8hN2nZtGXlqWbsatDYKnE7ot7Lcb9Zze5A2dLI2M1sbVq1oJ+k/vbtl HPEdshBkBVcR57pvmlOPRtVOvcZ0JLTbyyJb5Yxg9gWobsJDTov3Dry0p8/ihrQHrlTG 9WetJc7xkofm48YJv3VvEe4MvJQWUcAMsBx/4AdWYDpu1eAwJkOJj1cOdS6ch84o2f7K kUhWNWcm9AozH6ZB3GrJMXT5o33MD87F8tVRpaMEqb71uLRBc0I5PdAEVYFfEyMNVF7C WUAhMN4loAvzBcYwxlrt7xQpU/FyNvBSfDHxWL1rGg66eouohnTpvp1QSWNaAbVIlCQT H9ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=QTFIEUU5eHmrOFc1JVOGTzUrxPq8WYdHKs+aZJ15rEE=; b=CzAboU7Z/kTMCtdtBSWpH5lk020U2Uu8I+sZIGlDp95yWn6NJmrTi6YzjtNwMJpvzm c6TMJywNAVv2D1/Z5i6pcltdPt+RjNNsF/pW+vLlf2GgUeZ1DyTAcq64BA4OZQAvcuCS 2Tgw9ohBNDXtRH+LZ70DbmI2uN3KNuXfj0mB4iQddYYxbHNOmH1FCJSZN6DYauWzyfh3 z+mz6YnBHDtkT4m8qEPlhRY+bZFbNIs8aYtlCblmEYyWSM53ZDmTYXSYYgfTRb+u4+6t 74TwqrfV7mmwsvaHyUc0KWoWGnR36vRzbfVDR7qihKY6e6WcWxGEST8HPoIo/VxwM5Of 4oPQ== X-Gm-Message-State: AHPjjUgsA/a/xvv92xnqqQ2nViUeCzncWhhIGKU4jPm7Xkw4PR+3AIBW 7PSj7kt7iTM5jc7S7j9hcS1hvQ== X-Google-Smtp-Source: AOwi7QAqjaTZ7tc+zKjEBb+5sbcwOhYCgGdEHb4XHk8QV02fEJ9qTKN1Vzz+7Do+QRXwFbbFgGi/rA== X-Received: by 10.46.17.12 with SMTP id f12mr1155453lje.167.1506204794700; Sat, 23 Sep 2017 15:13:14 -0700 (PDT) Received: from magnolia ([178.70.247.167]) by smtp.gmail.com with ESMTPSA id g2sm660871ljb.61.2017.09.23.15.13.13 for <28560@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 23 Sep 2017 15:13:13 -0700 (PDT) From: Oleg Pykhalov To: 28560@debbugs.gnu.org Subject: Re: [bug#28560] [PATCH] web: Add try-files for the nginx-service-type. References: <874lruckq8.fsf@gmail.com> <87k20prshw.fsf@gmail.com> Date: Sun, 24 Sep 2017 01:13:12 +0300 In-Reply-To: <87k20prshw.fsf@gmail.com> (Oleg Pykhalov's message of "Sun, 24 Sep 2017 00:54:03 +0300") Message-ID: <87h8vtrrlz.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 28560 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable OK, I hacked little bit. Here is a snippet of Nginx service in system declaration and produced Nginx config from system build. --8<---------------cut here---------------start------------->8--- (define %cgit-configuration-nginx (list (nginx-server-configuration (root 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;"))))) (try-files (list "$uri" "@cgit")) (http-port 19418) (https-port #f) (ssl-certificate #f) (ssl-certificate-key #f)))) (operating-system =E2=80=A6 (services (cons* =E2=80=A6 (service nginx-service-type) (service fcgiwrap-service-type) (service cgit-service-type (cgit-configuration (nginx %cgit-configuration-nginx))) =E2=80=A6))) --8<---------------cut here---------------end--------------->8--- /gnu/store/pv4kna4526cijzpd6my69ikdb5qzb93m-nginx.conf --8<---------------cut here---------------start------------->8--- user nginx nginx; pid /var/run/nginx/pid; error_log /var/log/nginx/error.log info; http { client_body_temp_path /var/run/nginx/client_body_temp; proxy_temp_path /var/run/nginx/proxy_temp; fastcgi_temp_path /var/run/nginx/fastcgi_temp; uwsgi_temp_path /var/run/nginx/uwsgi_temp; scgi_temp_path /var/run/nginx/scgi_temp; access_log /var/log/nginx/access.log; include /gnu/store/vyj2vkmdmlpxn3mnj71vz8zc8j30ahkf-nginx-1.12.1/share/= nginx/conf/mime.types; server { listen 19418; server_name _ ; root /gnu/store/b4zg0sz6z1n32qnwmgmbbwh78i55hr56-cgit-1.1; index index.html ; try_files $uri @cgit ; server_tokens off; location @cgit { 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; } } } events {} --8<---------------cut here---------------end--------------->8--- --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-web-Add-try-files-for-the-nginx-service-type.patch >From 7177bc6e80c47e728486b4d5e7d61e926f17851a Mon Sep 17 00:00:00 2001 From: Oleg Pykhalov Date: Sat, 23 Sep 2017 03:27:49 +0300 Subject: [PATCH] web: Add try-files for the nginx-service-type. * gnu/services/web.scm (): Add nginx-server-configuration-try-files. (emit-nginx-server-config): Add this. --- gnu/services/web.scm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gnu/services/web.scm b/gnu/services/web.scm index 4aa6fd501..aec778801 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -99,6 +99,8 @@ (default '())) (index nginx-server-configuration-index (default (list "index.html"))) + (try-files nginx-server-configuration-try-files + (default '())) (ssl-certificate nginx-server-configuration-ssl-certificate (default "/etc/nginx/cert.pem")) (ssl-certificate-key nginx-server-configuration-ssl-certificate-key @@ -179,6 +181,7 @@ of index files." (nginx-server-configuration-ssl-certificate-key server)) (root (nginx-server-configuration-root server)) (index (nginx-server-configuration-index server)) + (try-files (nginx-server-configuration-try-files server)) (server-tokens? (nginx-server-configuration-server-tokens? server)) (locations (nginx-server-configuration-locations server))) (define-syntax-parameter <> (syntax-rules ())) @@ -207,6 +210,7 @@ of index files." (and/l ssl-certificate-key " ssl_certificate_key " <> ";\n") " root " root ";\n" " index " (config-index-strings index) ";\n" + (and/l (config-index-strings try-files) " try_files " <> ";\n") " server_tokens " (if server-tokens? "on" "off") ";\n" "\n" (map emit-nginx-location-config locations) -- 2.14.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 23 19:01:31 2017 Received: (at 28560) by debbugs.gnu.org; 23 Sep 2017 23:01:31 +0000 Received: from localhost ([127.0.0.1]:55001 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dvtQR-0002HP-DK for submit@debbugs.gnu.org; Sat, 23 Sep 2017 19:01:31 -0400 Received: from mail-lf0-f45.google.com ([209.85.215.45]:45927) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dvtQQ-0002HC-Aj for 28560@debbugs.gnu.org; Sat, 23 Sep 2017 19:01:30 -0400 Received: by mail-lf0-f45.google.com with SMTP id d17so3832224lfe.2 for <28560@debbugs.gnu.org>; Sat, 23 Sep 2017 16:01:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=vT8BJMXQ3KwsiUW8hYg40haELBi31OlYOZvihhaJiUQ=; b=QTRMFtGqF9FFPhqOsQH57sVrbV49qz/B3PjTGkVWlUjBJIW4YrWjIKIF8g9CUPxBPR mKAZVYNCsMny3o0e+O7Q3Jnn6HiLyJfl6vSBY8o9YLR9CrBqGc337MuFlMTduRxcIKjS eHHCEOhDD2/kToN8pFCZ9RPV3LqMJYqn2Mo/ksI7F/fHT8mzhbCIlobmxOw0xIQ/sQ6l Tyuip/+GhLw0Liup0FsYFZ4SMG/5eSL0EY8/uQV5+2EULJ08te8SUXELe7I5oAcliPx5 2sCd4frIZwsZ0vMqkCbEsf4Mr319GKjSpw4v8MBsg1noVqcLyEYnXmhzDZFzZNpOKPvm RPaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=vT8BJMXQ3KwsiUW8hYg40haELBi31OlYOZvihhaJiUQ=; b=Rq40GnPUBDyHXbbvsbcFWkUiC6JB3NXr+nNMIq4n5Y8q2std/kKCtVCQU38PtO0i3I CBSHGFGiZA4LKaQ/vJNIWg4Sjc8eq0hxhpdJ4fvjTQaY1OudcYF0GEqbPadDrJH+UiU8 PKEPAI5yaEr5wy7mX8TUEc/yNA6dn2MCTnNx9DxNPToJmx+Oh7y50OHXrMuoOH4i4g+U PZK9b59QRMZzEzUnwkFBSm2033rG7gJMMT9HMhgFdZAXXjJb852Ec6+OXFMf+asX0p8x PYJyKYElBxQa2gHIIp11d47W1QK7do4wkNHXIeO6MN5TZjTqLdokD2A340My2g+oeCue YcPg== X-Gm-Message-State: AHPjjUi+HNlolFen/YcHNRU9T25JgVz95vo757dkpWJmGsL7yU+oqIsI VuxXmmWxqEWD49lBFEzQa3QIAA== X-Google-Smtp-Source: AOwi7QAk4Bwy+dLWJ9AC1TKRG+LCiSNseX2ej3sFVEpUHfVVqq/Ov1AsglAboHiIXycjvxJ56VLzlg== X-Received: by 10.46.66.197 with SMTP id h66mr1265666ljf.108.1506207684062; Sat, 23 Sep 2017 16:01:24 -0700 (PDT) Received: from magnolia ([178.70.247.167]) by smtp.gmail.com with ESMTPSA id y86sm671484lje.54.2017.09.23.16.01.22 for <28560@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 23 Sep 2017 16:01:23 -0700 (PDT) From: Oleg Pykhalov To: 28560@debbugs.gnu.org Subject: Re: [bug#28560] [PATCH] web: Add try-files for the nginx-service-type. References: <874lruckq8.fsf@gmail.com> <87k20prshw.fsf@gmail.com> <87h8vtrrlz.fsf@gmail.com> Date: Sun, 24 Sep 2017 02:01:21 +0300 In-Reply-To: <87h8vtrrlz.fsf@gmail.com> (Oleg Pykhalov's message of "Sun, 24 Sep 2017 01:13:12 +0300") Message-ID: <87d16hrpdq.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 28560 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --=-=-= Content-Type: text/plain Fix failed test. --8<---------------cut here---------------start------------->8--- guix environment guix -- make check-system TESTS=nginx --8<---------------cut here---------------end--------------->8--- And system build is fine, too. --8<---------------cut here---------------start------------->8--- ./pre-inst-env guix system build ~/dotfiles/guix/system-magnolia.scm --8<---------------cut here---------------end--------------->8--- --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-web-Add-try-files-for-the-nginx-service-type.patch >From 20e411b4d3513106de43980afd46a71fea4cf107 Mon Sep 17 00:00:00 2001 From: Oleg Pykhalov Date: Sat, 23 Sep 2017 03:27:49 +0300 Subject: [PATCH] web: Add try-files for the nginx-service-type. * gnu/services/web.scm (): Add nginx-server-configuration-try-files. (emit-nginx-server-config): Add this. --- gnu/services/web.scm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gnu/services/web.scm b/gnu/services/web.scm index 4aa6fd501..9d713003c 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -99,6 +99,8 @@ (default '())) (index nginx-server-configuration-index (default (list "index.html"))) + (try-files nginx-server-configuration-try-files + (default '())) (ssl-certificate nginx-server-configuration-ssl-certificate (default "/etc/nginx/cert.pem")) (ssl-certificate-key nginx-server-configuration-ssl-certificate-key @@ -179,6 +181,7 @@ of index files." (nginx-server-configuration-ssl-certificate-key server)) (root (nginx-server-configuration-root server)) (index (nginx-server-configuration-index server)) + (try-files (nginx-server-configuration-try-files server)) (server-tokens? (nginx-server-configuration-server-tokens? server)) (locations (nginx-server-configuration-locations server))) (define-syntax-parameter <> (syntax-rules ())) @@ -207,6 +210,9 @@ of index files." (and/l ssl-certificate-key " ssl_certificate_key " <> ";\n") " root " root ";\n" " index " (config-index-strings index) ";\n" + (if (not (nil? try-files)) + (and/l (config-index-strings try-files) " try_files " <> ";\n") + "") " server_tokens " (if server-tokens? "on" "off") ";\n" "\n" (map emit-nginx-location-config locations) -- 2.14.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 24 09:02:49 2017 Received: (at 28560) by debbugs.gnu.org; 24 Sep 2017 13:02:50 +0000 Received: from localhost ([127.0.0.1]:55293 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dw6Yb-0000aL-Ky for submit@debbugs.gnu.org; Sun, 24 Sep 2017 09:02:49 -0400 Received: from lepiller.eu ([89.234.186.109]:48914 helo=localhost) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dw6YZ-0000aB-2i for 28560@debbugs.gnu.org; Sun, 24 Sep 2017 09:02:47 -0400 Received: from [10.64.158.134] (80.215.192.254 [80.215.192.254]) by localhost (OpenSMTPD) with ESMTPSA id db05cda3 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for <28560@debbugs.gnu.org>; Sun, 24 Sep 2017 13:02:44 +0000 (UTC) Date: Sun, 24 Sep 2017 15:02:43 +0200 User-Agent: K-9 Mail for Android In-Reply-To: <87d16hrpdq.fsf@gmail.com> References: <874lruckq8.fsf@gmail.com> <87k20prshw.fsf@gmail.com> <87h8vtrrlz.fsf@gmail.com> <87d16hrpdq.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----DOGEFC02YNK31S1DV7R45CQICWY8FG" Content-Transfer-Encoding: 7bit Subject: Re: [bug#28560] [PATCH] web: Add try-files for the nginx-service-type. To: 28560@debbugs.gnu.org From: Julien Lepiller Message-ID: <72986E30-EF66-44C3-AAEC-718F0CAD19D4@lepiller.eu> X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Le 24 septembre 2017 01:01:21 GMT+02:00, Oleg Pykhalov a écrit : >Fix failed test. >--88--- >guix environment guix -- make check-system TESTS=nginx >--88--- > >And system build is fine, too. >--88--- >./pre-inst-env guix system build ~/dotfiles/guix/system-magnolia.scm >--88--- [...] Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FSL_HELO_NON_FQDN_1 No description available. 3.6 HELO_LOCALHOST No description available. -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain 0.0 HTML_MESSAGE BODY: HTML included in message X-Debbugs-Envelope-To: 28560 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Le 24 septembre 2017 01:01:21 GMT+02:00, Oleg Pykhalov a écrit : >Fix failed test. >--88--- >guix environment guix -- make check-system TESTS=nginx >--88--- > >And system build is fine, too. >--88--- >./pre-inst-env guix system build ~/dotfiles/guix/system-magnolia.scm >--88--- [...] Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FSL_HELO_NON_FQDN_1 No description available. 3.6 HELO_LOCALHOST No description available. -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain 0.0 HTML_MESSAGE BODY: HTML included in message ------DOGEFC02YNK31S1DV7R45CQICWY8FG Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Le 24 septembre 2017 01:01:21 GMT+02:00, Oleg Pykhalov a =C3=A9crit : >Fix failed test=2E >--8<---------------cut here---------------start------------->8--- >guix environment guix -- make check-system TESTS=3Dnginx >--8<---------------cut here---------------end--------------->8--- > >And system build is fine, too=2E >--8<---------------cut here---------------start------------->8--- >=2E/pre-inst-env guix system build ~/dotfiles/guix/system-magnolia=2Escm >--8<---------------cut here---------------end--------------->8--- Thank you for the patch! I think it will be perfect after you update doc/g= uix=2Etexi too=2E ------DOGEFC02YNK31S1DV7R45CQICWY8FG Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Le 24 septembre 2017 01= :01:21 GMT+02:00, Oleg Pykhalov <go=2Ewigust@gmail=2Ecom> a =C3=A9cri= t :
Fix failed test=2E
--8<---------------cut he= re---------------start------------->8---
guix environment guix -- m= ake check-system TESTS=3Dnginx
--8<---------------cut here---------= ------end--------------->8---

And system build is fine, too= =2E
--8<---------------cut here---------------start------------->= ;8---
=2E/pre-inst-env guix system build ~/dotfiles/guix/system-magnol= ia=2Escm
--8<---------------cut here---------------end-------------= -->8---


Thank you = for the patch! I think it will be perfect after you update doc/guix=2Etexi = too=2E ------DOGEFC02YNK31S1DV7R45CQICWY8FG-- From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 24 14:09:36 2017 Received: (at 28560) by debbugs.gnu.org; 24 Sep 2017 18:09:36 +0000 Received: from localhost ([127.0.0.1]:56435 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwBLU-0007z8-7w for submit@debbugs.gnu.org; Sun, 24 Sep 2017 14:09:36 -0400 Received: from mail-wr0-f175.google.com ([209.85.128.175]:48724) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwBLS-0007yp-Aw for 28560@debbugs.gnu.org; Sun, 24 Sep 2017 14:09:34 -0400 Received: by mail-wr0-f175.google.com with SMTP id 108so4416886wra.5 for <28560@debbugs.gnu.org>; Sun, 24 Sep 2017 11:09:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=wvXaXaYStWeBWAo5PJR36sCL2PHd5mc3it2PAoL8RVY=; b=KdeRUeoRtSMfp2/xC1xAwTDdVtgZsumAHvbnqzlW6JQRth4UWxatZH29+jm6ZL5Odc rAtXWt8NJ+U0R/Pn9Kf8ZI48bzxOzygjsbuT2g6N1s4jE1w13Q1T3hm3i3LKM0Fnr3kQ WjRpVyX3t53qUnTI/2z/aDTTTpPMZ2xsXCh0q3p9YI3jr0aEkm76e/V8wGz9nRsWSGSh rXoVico7apizJQ/8odukM4/aqSnut2kbHiPsK2huYgXCDeS3rItBDDhfUcqnRuMqgOAP k7rADhOOQ1JiFx4A5lpDjE3YFZ1nyaBMNU1m+9e97i++3MD+1ZgUOWzU3nVhIflcS+2A clzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=wvXaXaYStWeBWAo5PJR36sCL2PHd5mc3it2PAoL8RVY=; b=SHTbinATCIDiv1kZqHNlSn9IZsGG2wX7y/zikpFMrgk7+lw8y/ZEKJyHh4osOekcrA NOCqgPQMgvfRqYVcNTpQpMl5i3xdtKM276wCzxTNcBRvnGm1Arp5W+Fn0hFsiJv7fGON zkGHdkun3aEJSSI7tHmcWaR+UZmvGowP8TVPLuf6sbTqkQnEPAX4FKQN64pWkW+6ZXDi bOnsV05OTtAkNJllPc8VR+jopIIJr9yHAgEQXfPNFE/IJhJCAMFtohg9fJFnj31U7WPP q6jCHS0m1MzpusQyNvZZr20LPyGbI3K+v/nFdr9O3dfj6CEKzcaqQf3swEoMnrW2acf5 VYLA== X-Gm-Message-State: AHPjjUhNYmvE4KbRFSiMVATrselzFT4atAjw0nroCrEAkPGbhDV7bbBQ wFaE/Fd9zsfabtkPBOfUXT8xlw== X-Google-Smtp-Source: AOwi7QAonQ9VKeRb9efM4ldGV+HrHa+RHEpYAppXI6i4ywNJ79mTBstN2L3Vj3TrmOYLXylVXwnkQQ== X-Received: by 10.46.25.18 with SMTP id p18mr1835935lje.151.1506276568105; Sun, 24 Sep 2017 11:09:28 -0700 (PDT) Received: from magnolia ([178.71.40.139]) by smtp.gmail.com with ESMTPSA id 10sm242833ljo.13.2017.09.24.11.09.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 24 Sep 2017 11:09:27 -0700 (PDT) From: Oleg Pykhalov To: Julien Lepiller Subject: Re: [bug#28560] [PATCH] web: Add try-files for the nginx-service-type. References: <874lruckq8.fsf@gmail.com> <87k20prshw.fsf@gmail.com> <87h8vtrrlz.fsf@gmail.com> <87d16hrpdq.fsf@gmail.com> <72986E30-EF66-44C3-AAEC-718F0CAD19D4@lepiller.eu> Date: Sun, 24 Sep 2017 21:09:26 +0300 In-Reply-To: <72986E30-EF66-44C3-AAEC-718F0CAD19D4@lepiller.eu> (Julien Lepiller's message of "Sun, 24 Sep 2017 15:02:43 +0200") Message-ID: <87fubcynmx.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 28560 Cc: 28560@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Hello Julien, Julien Lepiller writes: > Thank you for the patch! I think it will be perfect after you update doc/guix.texi too. Thank you for review. I rephrase little bit https://nginx.org/en/docs/http/ngx_http_core_module.html#try_files Here is a new patch. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-web-Add-try-files-for-the-nginx-service-type.patch >From fa5c4df154da2029d1f909c51b742377f55d732e Mon Sep 17 00:00:00 2001 From: Oleg Pykhalov Date: Sat, 23 Sep 2017 03:27:49 +0300 Subject: [PATCH] web: Add try-files for the nginx-service-type. * gnu/services/web.scm (): Add nginx-server-configuration-try-files. (emit-nginx-server-config): Add this. * doc/guix.texi (Web Services): Add this. --- doc/guix.texi | 5 +++++ gnu/services/web.scm | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index 0462a6419..e60ddafde 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -14344,6 +14344,11 @@ server block. Index files to look for when clients ask for a directory. If it cannot be found, Nginx will send the list of files in the directory. +@item @code{try-files} (default: @code{'()}) +A list of files to check their existence in the specified order and uses +the first found file for request processing; the processing is performed +in the current context. + @item @code{ssl-certificate} (default: @code{"/etc/nginx/cert.pem"}) Where to find the certificate for secure connections. Set it to @code{#f} if you don't have a certificate or you don't want to use HTTPS. diff --git a/gnu/services/web.scm b/gnu/services/web.scm index 4aa6fd501..9d713003c 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -99,6 +99,8 @@ (default '())) (index nginx-server-configuration-index (default (list "index.html"))) + (try-files nginx-server-configuration-try-files + (default '())) (ssl-certificate nginx-server-configuration-ssl-certificate (default "/etc/nginx/cert.pem")) (ssl-certificate-key nginx-server-configuration-ssl-certificate-key @@ -179,6 +181,7 @@ of index files." (nginx-server-configuration-ssl-certificate-key server)) (root (nginx-server-configuration-root server)) (index (nginx-server-configuration-index server)) + (try-files (nginx-server-configuration-try-files server)) (server-tokens? (nginx-server-configuration-server-tokens? server)) (locations (nginx-server-configuration-locations server))) (define-syntax-parameter <> (syntax-rules ())) @@ -207,6 +210,9 @@ of index files." (and/l ssl-certificate-key " ssl_certificate_key " <> ";\n") " root " root ";\n" " index " (config-index-strings index) ";\n" + (if (not (nil? try-files)) + (and/l (config-index-strings try-files) " try_files " <> ";\n") + "") " server_tokens " (if server-tokens? "on" "off") ";\n" "\n" (map emit-nginx-location-config locations) -- 2.14.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 26 03:53:58 2017 Received: (at 28560) by debbugs.gnu.org; 26 Sep 2017 07:53:58 +0000 Received: from localhost ([127.0.0.1]:59588 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwkgo-00047f-A3 for submit@debbugs.gnu.org; Tue, 26 Sep 2017 03:53:58 -0400 Received: from lepiller.eu ([89.234.186.109]:48916 helo=localhost) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwkgm-00047V-Ft for 28560@debbugs.gnu.org; Tue, 26 Sep 2017 03:53:57 -0400 Received: from [131.254.252.203] (131.254.252.203 [131.254.252.203]) by localhost (OpenSMTPD) with ESMTPSA id faaf10a9 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for <28560@debbugs.gnu.org>; Tue, 26 Sep 2017 07:53:54 +0000 (UTC) Date: Tue, 26 Sep 2017 09:53:52 +0200 User-Agent: K-9 Mail for Android In-Reply-To: <87fubcynmx.fsf@gmail.com> References: <874lruckq8.fsf@gmail.com> <87k20prshw.fsf@gmail.com> <87h8vtrrlz.fsf@gmail.com> <87d16hrpdq.fsf@gmail.com> <72986E30-EF66-44C3-AAEC-718F0CAD19D4@lepiller.eu> <87fubcynmx.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----U42XU8R6W0RGTOEDTW4OIKXUHDPB33" Content-Transfer-Encoding: 7bit Subject: Re: [bug#28560] [PATCH] web: Add try-files for the nginx-service-type. From: Julien Lepiller Message-ID: <67F0DB51-4862-4965-B467-DB517FB3F348@lepiller.eu> X-Spam-Score: 4.8 (++++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Le 24 septembre 2017 20:09:26 GMT+02:00, Oleg Pykhalov a écrit : >Hello Julien, > >Julien Lepiller writes: > >> Thank you for the patch! I think it will be perfect after you update >doc/guix.texi too. > >Thank you for review. > >I rephrase little bit >https://nginx.org/en/docs/http/ngx_http_core_module.html#try_files > >Here is a new patch. [...] Content analysis details: (4.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FSL_HELO_NON_FQDN_1 No description available. 3.6 HELO_LOCALHOST No description available. 1.2 MISSING_HEADERS Missing To: header -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain 0.0 HTML_MESSAGE BODY: HTML included in message X-Debbugs-Envelope-To: 28560 Cc: 28560@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 4.8 (++++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Le 24 septembre 2017 20:09:26 GMT+02:00, Oleg Pykhalov a écrit : >Hello Julien, > >Julien Lepiller writes: > >> Thank you for the patch! I think it will be perfect after you update >doc/guix.texi too. > >Thank you for review. > >I rephrase little bit >https://nginx.org/en/docs/http/ngx_http_core_module.html#try_files > >Here is a new patch. [...] Content analysis details: (4.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FSL_HELO_NON_FQDN_1 No description available. 3.6 HELO_LOCALHOST No description available. 1.2 MISSING_HEADERS Missing To: header -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain 0.0 HTML_MESSAGE BODY: HTML included in message ------U42XU8R6W0RGTOEDTW4OIKXUHDPB33 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Le 24 septembre 2017 20:09:26 GMT+02:00, Oleg Pykhalov a =C3=A9crit : >Hello Julien, > >Julien Lepiller writes: > >> Thank you for the patch! I think it will be perfect after you update >doc/guix=2Etexi too=2E > >Thank you for review=2E > >I rephrase little bit >https://nginx=2Eorg/en/docs/http/ngx_http_core_module=2Ehtml#try_files > >Here is a new patch=2E Hi, I don't think your rephrasing works, I have some troubles making sense of = it, even though I know what it is supposed to do=2E Maybe: A list of files whose existence is checked in the specified order=2E @code= {nginx} will use the first file it finds to process the request=2E I'm not sure about the last part of your sentence, do we explain what the = "current context" is? Is it even relevant? Could you add a sentence to expl= ain the usage of variables here, such as "$uri"? Maybe a small example woul= d be enough=2E Thank you! ------U42XU8R6W0RGTOEDTW4OIKXUHDPB33 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Le 24 septembre 2017 20= :09:26 GMT+02:00, Oleg Pykhalov <go=2Ewigust@gmail=2Ecom> a =C3=A9cri= t :
Hello Julien,

Julien Lepiller <julien@= lepiller=2Eeu> writes:

Thank you for the patch! I think it will be perfect after you u= pdate doc/guix=2Etexi too=2E

Thank you for review= =2E

I rephrase little bit
https://nginx=2Eorg/en/do= cs/http/ngx_http_core_module=2Ehtml#try_files

Here is a new = patch=2E


Hi,

I don't think your rephrasing works, I have some troubles making sense= of it, even though I know what it is supposed to do=2E Maybe:

A list of files whose existence is checked in the specified order=2E @code= {nginx} will use the first file it finds to process the request=2E

I'm not sure about the last part of your sentence, do we explain what = the "current context" is? Is it even relevant? Could you add a se= ntence to explain the usage of variables here, such as "$uri"? Ma= ybe a small example would be enough=2E

Thank you! ------U42XU8R6W0RGTOEDTW4OIKXUHDPB33-- From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 28 13:05:05 2017 Received: (at 28560) by debbugs.gnu.org; 28 Sep 2017 17:05:05 +0000 Received: from localhost ([127.0.0.1]:37002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxcFE-0008Ik-Pa for submit@debbugs.gnu.org; Thu, 28 Sep 2017 13:05:05 -0400 Received: from mail-wr0-f171.google.com ([209.85.128.171]:46332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxcFB-0008IC-IH for 28560@debbugs.gnu.org; Thu, 28 Sep 2017 13:05:03 -0400 Received: by mail-wr0-f171.google.com with SMTP id o42so3871201wrb.3 for <28560@debbugs.gnu.org>; Thu, 28 Sep 2017 10:05:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=rx2P3OEigXipVRobQNLTwvKmEwWk07A3fHyTU8Ld6cs=; b=LJAti8aq5fXt72z6AkGF6mIb1Ib340G2GPa5cVUO5QkjB+VFfAFsZRgi9/vvo//NVl /vNC57Wt2ZNnflPMpabTEc7e5MxSh8UT0eO8UytqZnqKDsFAMURt1WqOM0zy14SW8XkI FeycUwPAz+ecqa4hKb9kvkgzUKbCliK84Gh4jb4JyY3gacNK8AnbfSo4UKR+0+u+4OA/ AtALv4w39wlUKfj+Fpm49iz+n51naBS85seo35MDP+vdDv47U2U6Pye2hJIgNe8n+tg6 L/yYVUqqseLDJWUQ1sJs+mL7wmtRS2KdUBVY0THBVYXMxyuMcA0sG0uL86U2TJTU5PT4 cmXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=rx2P3OEigXipVRobQNLTwvKmEwWk07A3fHyTU8Ld6cs=; b=h5jDCgK2H5LwREL1qo6o74nMfdXXIbzNCSEZXq1IAoXzqtIlGk4FO1eTMwQHRqVSaz TEde7pMwM4rEAauAzpDWgtfmk4Bv3R5SgaEzQ37YssuzZK8uFljFgLRivRFcL/x8gUnw zNFr/Q4PD9wRXS9j4HdVLF/S/3J/Gh8KEQD610FGN3Yx1iafHlM8F+SDv9sVCdCuUkaM /W8D15+qt/5GCEfNJZKEcIPKQvQ9Vc6FrCZCD9za03fR3ZDJZtgY9DRwOcFgcjY8VXD2 0UgKYSZ+I/C7PQ5vLSXhEVZ8jwuwtOdpAlG6uh9nAw9C8rb7VdF+617M8jgscZ0DkmYw VDqg== X-Gm-Message-State: AHPjjUiN7gchB0xc7BgEHVQBrhU2BkW8eueF7nQlpiaRWeXu1WiaUobA M8pcbYZw4DqCoqdzqcXy3tUQhg== X-Google-Smtp-Source: AOwi7QACCJk2Aa6URMyrgZKBN3xHbYCDcXsxtatOzowWGpXgKrLU1Y158GZrabqtr6/oyUfIegHmgA== X-Received: by 10.25.150.213 with SMTP id y204mr170437lfd.91.1506618295261; Thu, 28 Sep 2017 10:04:55 -0700 (PDT) Received: from magnolia ([178.71.65.187]) by smtp.gmail.com with ESMTPSA id 37sm273628lfv.46.2017.09.28.10.04.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Sep 2017 10:04:54 -0700 (PDT) From: Oleg Pykhalov To: Julien Lepiller Subject: Re: [bug#28560] [PATCH] web: Add try-files for the nginx-service-type. References: <874lruckq8.fsf@gmail.com> <87k20prshw.fsf@gmail.com> <87h8vtrrlz.fsf@gmail.com> <87d16hrpdq.fsf@gmail.com> <72986E30-EF66-44C3-AAEC-718F0CAD19D4@lepiller.eu> <87fubcynmx.fsf@gmail.com> <67F0DB51-4862-4965-B467-DB517FB3F348@lepiller.eu> Date: Thu, 28 Sep 2017 20:04:53 +0300 In-Reply-To: <67F0DB51-4862-4965-B467-DB517FB3F348@lepiller.eu> (Julien Lepiller's message of "Tue, 26 Sep 2017 09:53:52 +0200") Message-ID: <873776sqiy.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 28560 Cc: 28560@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello Julien, Julien Lepiller writes: > I'm not sure about the last part of your sentence, do we explain what > the "current context" is? No we didn't. And I don't see any =E2=80=98context=E2=80=99 mention in =E2= =80=98@subsubsection Web Services=E2=80=99. > Is it even relevant? Probably not relevant. > Could you add a sentence to explain the usage of variables here, such > as "$uri"? Maybe a small example would be enough. Sure. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-web-Add-try-files-for-the-nginx-service-type.patch >From 783d1c22dfda8d1a86c0a01683ebe1278e44c3bd Mon Sep 17 00:00:00 2001 From: Oleg Pykhalov Date: Sat, 23 Sep 2017 03:27:49 +0300 Subject: [PATCH] web: Add try-files for the nginx-service-type. * gnu/services/web.scm (): Add nginx-server-configuration-try-files. (emit-nginx-server-config): Add this. * doc/guix.texi (Web Services): Add this. --- doc/guix.texi | 7 ++++++- gnu/services/web.scm | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index dd0a46a63..1b329d255 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -14263,7 +14263,8 @@ blocks, as in this example: (https-port #f) (ssl-certificate #f) (ssl-certificate-key #f) - (root "/srv/http/extra-website")))) + (root "/srv/http/extra-website") + (try-files (list "$uri" "$uri/index.html"))))) @end example @end deffn @@ -14394,6 +14395,10 @@ server block. Index files to look for when clients ask for a directory. If it cannot be found, Nginx will send the list of files in the directory. +@item @code{try-files} (default: @code{'()}) +A list of files whose existence is checked in the specified order. +@code{nginx} will use the first file it finds to process the request. + @item @code{ssl-certificate} (default: @code{"/etc/nginx/cert.pem"}) Where to find the certificate for secure connections. Set it to @code{#f} if you don't have a certificate or you don't want to use HTTPS. diff --git a/gnu/services/web.scm b/gnu/services/web.scm index 4aa6fd501..9d713003c 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -99,6 +99,8 @@ (default '())) (index nginx-server-configuration-index (default (list "index.html"))) + (try-files nginx-server-configuration-try-files + (default '())) (ssl-certificate nginx-server-configuration-ssl-certificate (default "/etc/nginx/cert.pem")) (ssl-certificate-key nginx-server-configuration-ssl-certificate-key @@ -179,6 +181,7 @@ of index files." (nginx-server-configuration-ssl-certificate-key server)) (root (nginx-server-configuration-root server)) (index (nginx-server-configuration-index server)) + (try-files (nginx-server-configuration-try-files server)) (server-tokens? (nginx-server-configuration-server-tokens? server)) (locations (nginx-server-configuration-locations server))) (define-syntax-parameter <> (syntax-rules ())) @@ -207,6 +210,9 @@ of index files." (and/l ssl-certificate-key " ssl_certificate_key " <> ";\n") " root " root ";\n" " index " (config-index-strings index) ";\n" + (if (not (nil? try-files)) + (and/l (config-index-strings try-files) " try_files " <> ";\n") + "") " server_tokens " (if server-tokens? "on" "off") ";\n" "\n" (map emit-nginx-location-config locations) -- 2.14.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 28 14:41:35 2017 Received: (at 28560-done) by debbugs.gnu.org; 28 Sep 2017 18:41:35 +0000 Received: from localhost ([127.0.0.1]:37085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxdkc-0002GN-Uz for submit@debbugs.gnu.org; Thu, 28 Sep 2017 14:41:35 -0400 Received: from lepiller.eu ([89.234.186.109]:49038) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxdkb-0002GE-C1 for 28560-done@debbugs.gnu.org; Thu, 28 Sep 2017 14:41:33 -0400 Received: from localhost (static-176-182-42-79.ncc.abo.bbox.fr [176.182.42.79]) by lepiller.eu (OpenSMTPD) with ESMTPSA id 599197a6 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for <28560-done@debbugs.gnu.org>; Thu, 28 Sep 2017 18:41:31 +0000 (UTC) Date: Thu, 28 Sep 2017 20:40:05 +0200 From: Julien Lepiller To: 28560-done@debbugs.gnu.org Subject: Re: [bug#28560] [PATCH] web: Add try-files for the nginx-service-type. Message-ID: <20170928204005.47bfe419@lepiller.eu> In-Reply-To: <873776sqiy.fsf@gmail.com> References: <874lruckq8.fsf@gmail.com> <87k20prshw.fsf@gmail.com> <87h8vtrrlz.fsf@gmail.com> <87d16hrpdq.fsf@gmail.com> <72986E30-EF66-44C3-AAEC-718F0CAD19D4@lepiller.eu> <87fubcynmx.fsf@gmail.com> <67F0DB51-4862-4965-B467-DB517FB3F348@lepiller.eu> <873776sqiy.fsf@gmail.com> X-Mailer: Claws Mail 3.15.1-dirty (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 28560-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Le Thu, 28 Sep 2017 20:04:53 +0300, Oleg Pykhalov a =C3=A9crit : > Hello Julien, >=20 > Julien Lepiller writes: >=20 > > I'm not sure about the last part of your sentence, do we explain > > what the "current context" is? =20 >=20 > No we didn't. And I don't see any =E2=80=98context=E2=80=99 mention in > =E2=80=98@subsubsection Web Services=E2=80=99. >=20 > > Is it even relevant? =20 >=20 > Probably not relevant. >=20 > > Could you add a sentence to explain the usage of variables here, > > such as "$uri"? Maybe a small example would be enough. =20 >=20 > Sure. >=20 Thank you, that was perfect! Pushed as 4d14808af4c01b4fb0a4564584aa68f0e53c4ef4, with a slightly different commit message. From unknown Fri Aug 15 20:47:15 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 27 Oct 2017 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator