all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: 29467@debbugs.gnu.org
Subject: [bug#29467] [PATCH 2/2] services: web: Remove default certificate and key files for nginx.
Date: Sat,  9 Dec 2017 09:31:14 +0000	[thread overview]
Message-ID: <20171209093114.5112-2-mail@cbaines.net> (raw)
In-Reply-To: <20171209093114.5112-1-mail@cbaines.net>

If nginx is configured with a ssl-certificate file, and ssl-certificate-key,
it will fail to start unless these exist. To avoid this happening, change the
default to #f.

* gnu/services/web.scm (<nginx-server-configuration>)
  [ssl-certificate,ssl-certificate-key]: Set the defaults to #f.
* gnu/tests/web.scm (%nginx-servers): Remove redundant
  nginx-server-configuration fields.
* doc/guix.texi (Web Services): Update examples and documentation.
---
 doc/guix.texi        | 20 ++++----------------
 gnu/services/web.scm |  4 ++--
 gnu/tests/web.scm    |  5 +----
 3 files changed, 7 insertions(+), 22 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 23ccfa2f6..35f895bb4 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -14813,10 +14813,7 @@ A simple example configuration is given below.
            (server-blocks
              (list (nginx-server-configuration
                      (server-name '("www.example.com"))
-                     (root "/srv/http/www.example.com")
-                     (https-port #f)
-                     (ssl-certificate #f)
-                     (ssl-certificate-key #f))))))
+                     (root "/srv/http/www.example.com"))))))
 @end example
 
 In addition to adding server blocks to the service configuration
@@ -14826,9 +14823,6 @@ blocks, as in this example:
 @example
 (simple-service 'my-extra-server nginx-service-type
                 (list (nginx-server-configuration
-                        (https-port #f)
-                        (ssl-certificate #f)
-                        (ssl-certificate-key #f)
                         (root "/srv/http/extra-website")
                         (try-files (list "$uri" "$uri/index.html")))))
 @end example
@@ -14873,10 +14867,7 @@ HTTPS.
            (server-blocks
              (list (nginx-server-configuration
                      (server-name '("www.example.com"))
-                     (root "/srv/http/www.example.com")
-                     (https-port #f)
-                     (ssl-certificate #f)
-                     (ssl-certificate-key #f))))))
+                     (root "/srv/http/www.example.com"))))))
 @end example
 
 @item @code{upstream-blocks} (default: @code{'()})
@@ -14899,9 +14890,6 @@ requests with two servers.
       (list (nginx-server-configuration
               (server-name '("www.example.com"))
               (root "/srv/http/www.example.com")
-              (https-port #f)
-              (ssl-certificate #f)
-              (ssl-certificate-key #f)
               (locations
                 (list
                   (nginx-location-configuration
@@ -14965,11 +14953,11 @@ Nginx will send the list of files in the directory.
 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"})
+@item @code{ssl-certificate} (default: @code{#f})
 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.
 
-@item @code{ssl-certificate-key} (default: @code{"/etc/nginx/key.pem"})
+@item @code{ssl-certificate-key} (default: @code{#f})
 Where to find the private key for secure connections.  Set it to @code{#f} if
 you don't have a key or you don't want to use HTTPS.
 
diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index 1af32278c..51cd9da1d 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -102,9 +102,9 @@
   (try-files           nginx-server-configuration-try-files
                        (default '()))
   (ssl-certificate     nginx-server-configuration-ssl-certificate
-                       (default "/etc/nginx/cert.pem"))
+                       (default #f))
   (ssl-certificate-key nginx-server-configuration-ssl-certificate-key
-                       (default "/etc/nginx/key.pem"))
+                       (default #f))
   (server-tokens?      nginx-server-configuration-server-tokens?
                        (default #f)))
 
diff --git a/gnu/tests/web.scm b/gnu/tests/web.scm
index 3fa272c67..de7ab3cd6 100644
--- a/gnu/tests/web.scm
+++ b/gnu/tests/web.scm
@@ -45,10 +45,7 @@
   ;; Server blocks.
   (list (nginx-server-configuration
          (root "/srv")
-         (http-port 8042)
-         (https-port #f)
-         (ssl-certificate #f)
-         (ssl-certificate-key #f))))
+         (http-port 8042))))
 
 (define %nginx-os
   ;; Operating system under test.
-- 
2.14.2

  reply	other threads:[~2017-12-09  9:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-27  8:26 [bug#29467] [PATCH] web: Don't error about missing ssl related files Christopher Baines
2017-11-27  9:22 ` julien lepiller
2017-12-05 11:14   ` Ludovic Courtès
2017-12-05 11:23     ` julien lepiller
2017-12-08  9:41       ` Ludovic Courtès
2017-12-09  9:31         ` [bug#29467] [PATCH 1/2] " Christopher Baines
2017-12-09  9:31           ` Christopher Baines [this message]
2017-12-11 13:26             ` [bug#29467] [PATCH 2/2] services: web: Remove default certificate and key files for nginx Ludovic Courtès
2017-12-11 20:41               ` bug#29467: " Christopher Baines
2017-12-11 13:26           ` [bug#29467] [PATCH 1/2] web: Don't error about missing ssl related files Ludovic Courtès
2017-12-09  9:37         ` [bug#29467] [PATCH] " Christopher Baines

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=20171209093114.5112-2-mail@cbaines.net \
    --to=mail@cbaines.net \
    --cc=29467@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.