GNU bug report logs -
#63877
[PATCH] gnu: services: web: Set SSL_CERT_DIR in php-fpm environment.
Previous Next
Full log
View this message in rfc822 format
Some PHP programs, like Nextcloud, make HTTPS requests to other servers. For
this, they need to know where the system CA certificates are.
* gnu/services/web.scm (php-fpm-shepherd-service): Set SSL_CERT_DIR
environment variable.
---
This solution adds a dependency from the resulting Shepherd service to the
nss-certs package, which weighs 0.3 MiB. An alternative solution might be to
set SSL_CERT_DIR=/etc/ssl/certs instead and rely on nss-certs being installed
system-wide.
gnu/services/web.scm | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index 45897d7d6f..e46710a040 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -16,6 +16,7 @@
;;; Copyright © 2020, 2021 Alexandru-Sergiu Marton <brown121407 <at> posteo.ro>
;;; Copyright © 2022 Simen Endsjø <simendsjo <at> gmail.com>
;;; Copyright © 2023 Bruno Victal <mirai <at> makinata.eu>
+;;; Copyright © 2023 Timo Wilken <guix <at> twilken.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1096,6 +1097,12 @@ (define php-fpm-shepherd-service
#$@(if php-ini-file
`("-c" ,php-ini-file)
'()))
+ #:environment-variables
+ (cons*
+ ;; Needed by e.g. Nextcloud to make HTTPS requests.
+ (string-append
+ "SSL_CERT_DIR=" #$(file-append nss-certs "/etc/ssl/certs"))
+ (default-environment-variables))
#:pid-file #$pid-file))
(stop #~(make-kill-destructor)))))))
base-commit: 66c9b82fed3c59ee07187898592c688c82fed273
--
2.40.1
This bug report was last modified 1 year and 119 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.