From: Oleg Pykhalov <go.wigust@gmail.com>
To: 28560@debbugs.gnu.org
Subject: [bug#28560] [PATCH] web: Add try-files for the nginx-service-type.
Date: Sat, 23 Sep 2017 03:38:39 +0300 [thread overview]
Message-ID: <874lruckq8.fsf@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 303 bytes --]
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: [PATCH] web: Add try-files for the nginx-service-type. --]
[-- Type: text/x-patch, Size: 2029 bytes --]
From 16acb7e5298b21a3c40207e1719248eaa5698d50 Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust@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
next reply other threads:[~2017-09-23 0:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-23 0:38 Oleg Pykhalov [this message]
2017-09-23 21:54 ` [bug#28560] [PATCH] web: Add try-files for the nginx-service-type Oleg Pykhalov
2017-09-23 22:13 ` Oleg Pykhalov
2017-09-23 23:01 ` Oleg Pykhalov
2017-09-24 13:02 ` Julien Lepiller
2017-09-24 18:09 ` Oleg Pykhalov
2017-09-26 7:53 ` Julien Lepiller
2017-09-28 17:04 ` Oleg Pykhalov
2017-09-28 18:40 ` bug#28560: " Julien Lepiller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874lruckq8.fsf@gmail.com \
--to=go.wigust@gmail.com \
--cc=28560@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.