From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dvYTJ-0003bW-LF for guix-patches@gnu.org; Fri, 22 Sep 2017 20:39:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dvYTG-0007La-Ex for guix-patches@gnu.org; Fri, 22 Sep 2017 20:39:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:44667) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dvYTG-0007LP-9n for guix-patches@gnu.org; Fri, 22 Sep 2017 20:39:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dvYTF-0004tt-VV for guix-patches@gnu.org; Fri, 22 Sep 2017 20:39:02 -0400 Subject: [bug#28560] [PATCH] web: Add try-files for the nginx-service-type. Resent-Message-ID: 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 From: Oleg Pykhalov Date: Sat, 23 Sep 2017 03:38:39 +0300 Message-ID: <874lruckq8.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 28560@debbugs.gnu.org --=-=-= 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 --=-=-=--