GNU bug report logs - #28560
[PATCH] web: Add try-files for the nginx-service-type.

Previous Next

Package: guix-patches;

Reported by: Oleg Pykhalov <go.wigust <at> gmail.com>

Date: Sat, 23 Sep 2017 00:39:01 UTC

Severity: normal

Tags: patch

Done: Julien Lepiller <julien <at> lepiller.eu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Oleg Pykhalov <go.wigust <at> gmail.com>
Subject: bug#28560: closed (Re: [bug#28560] [PATCH] web: Add try-files for
 the nginx-service-type.)
Date: Thu, 28 Sep 2017 18:42:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#28560: [PATCH] web: Add try-files for the nginx-service-type.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 28560 <at> debbugs.gnu.org.

-- 
28560: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=28560
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Julien Lepiller <julien <at> lepiller.eu>
To: 28560-done <at> debbugs.gnu.org
Subject: Re: [bug#28560] [PATCH] web: Add try-files for the nginx-service-type.
Date: Thu, 28 Sep 2017 20:40:05 +0200
Le Thu, 28 Sep 2017 20:04:53 +0300,
Oleg Pykhalov <go.wigust <at> gmail.com> a écrit :

> Hello Julien,
> 
> Julien Lepiller <julien <at> lepiller.eu> 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 ‘context’ mention in
> ‘@subsubsection Web Services’.
> 
> > 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.
> 

Thank you, that was perfect!

Pushed as 4d14808af4c01b4fb0a4564584aa68f0e53c4ef4, with a slightly
different commit message.

[Message part 3 (message/rfc822, inline)]
From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: Ludovic
 Courtès <ludo <at> gnu.org>, Christopher Baines <mail <at> cbaines.net>
Subject: [PATCH] web: Add try-files for the nginx-service-type.
Date: Sat, 23 Sep 2017 03:38:39 +0300
[Message part 4 (text/plain, inline)]
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

[0001-web-Add-try-files-for-the-nginx-service-type.patch (text/x-patch, inline)]
From 16acb7e5298b21a3c40207e1719248eaa5698d50 Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust <at> gmail.com>
Date: Sat, 23 Sep 2017 03:27:49 +0300
Subject: [PATCH] web: Add try-files for the nginx-service-type.

* gnu/services/web.scm (<nginx-server-configuration>): 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


This bug report was last modified 7 years and 294 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.