summaryrefslogtreecommitdiff
path: root/gnu/services/web.scm
diff options
context:
space:
mode:
authorClément Lassieur <clement@lassieur.org>2017-12-09 12:59:12 +0100
committerClément Lassieur <clement@lassieur.org>2017-12-18 12:03:14 +0100
commit8b223ceac4ff0781e95d69362875f87cff03f4d6 (patch)
tree4a501621f9a6d30c314552fe1944cfbc2f5f70c0 /gnu/services/web.scm
parentf1a2b1cb20cdc0c7f3e58bab4acea39eabfbd5a5 (diff)
services: nginx: Replace 'http-port' and 'https-port' with 'listen'.
* doc/guix.texi (Web Services, Version Control Services): Update accordingly. * gnu/services/certbot.scm (certbot-nginx-server-configurations): Likewise. * gnu/services/version-control.scm (%cgit-configuration-nginx): Likewise. * gnu/services/web.scm (<nginx-server-configuration>, emit-nginx-server-config): Likewise. * gnu/tests/version-control.scm (%cgit-configuration-nginx, %git-nginx-configuration): Likewise. * gnu/tests/web.scm (%nginx-servers, %php-fpm-nginx-server-blocks): Likewise.
Diffstat (limited to 'gnu/services/web.scm')
-rw-r--r--gnu/services/web.scm16
1 files changed, 6 insertions, 10 deletions
diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index 582cf535cb..8a16f50de4 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2017 Christopher Baines <mail@cbaines.net>
;;; Copyright © 2017 nee <nee-git@hidamari.blue>
+;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -49,8 +50,7 @@
<nginx-server-configuration>
nginx-server-configuration
nginx-server-configuration?
- nginx-server-configuration-http-port
- nginx-server-configuartion-https-port
+ nginx-server-configuration-listen
nginx-server-configuration-server-name
nginx-server-configuration-root
nginx-server-configuration-locations
@@ -135,10 +135,8 @@
(define-record-type* <nginx-server-configuration>
nginx-server-configuration make-nginx-server-configuration
nginx-server-configuration?
- (http-port nginx-server-configuration-http-port
- (default 80))
- (https-port nginx-server-configuration-https-port
- (default 443))
+ (listen nginx-server-configuration-listen
+ (default '("80" "443 ssl")))
(server-name nginx-server-configuration-server-name
(default (list 'default)))
(root nginx-server-configuration-root
@@ -225,8 +223,7 @@ of index files."
" }\n"))))
(define (emit-nginx-server-config server)
- (let ((http-port (nginx-server-configuration-http-port server))
- (https-port (nginx-server-configuration-https-port server))
+ (let ((listen (nginx-server-configuration-listen server))
(server-name (nginx-server-configuration-server-name server))
(ssl-certificate (nginx-server-configuration-ssl-certificate server))
(ssl-certificate-key
@@ -245,8 +242,7 @@ of index files."
'())))
(list
" server {\n"
- (and/l http-port " listen " (number->string <>) ";\n")
- (and/l https-port " listen " (number->string <>) " ssl;\n")
+ (map (lambda (directive) (list " listen " directive ";\n")) listen)
" server_name " (config-domain-strings server-name) ";\n"
(and/l ssl-certificate " ssl_certificate " <> ";\n")
(and/l ssl-certificate-key " ssl_certificate_key " <> ";\n")