From 4d14808af4c01b4fb0a4564584aa68f0e53c4ef4 Mon Sep 17 00:00:00 2001 From: Oleg Pykhalov Date: Sat, 23 Sep 2017 03:27:49 +0300 Subject: services: web: Add try-files for the nginx-service-type. * gnu/services/web.scm (): Add nginx-server-configuration-try-files. (emit-nginx-server-config): Use it. * doc/guix.texi (Web Services): Document it. --- doc/guix.texi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index dd0a46a638..1b329d255a 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. -- cgit v1.2.3