summaryrefslogtreecommitdiff
path: root/gnu/tests
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim@guixotic.coop>2026-05-25 12:19:42 +0900
committerMaxim Cournoyer <maxim@guixotic.coop>2026-06-03 13:52:35 +0900
commit2aa2bbc5fe4594daa3c782a4bfe258db77fdc01f (patch)
tree61cf4b2a29bc6d47a1c9cbed6475a6b7a026e7ac /gnu/tests
parentd2cadc2cfe4cbdfb607b84fdd0f356f14dbc5c1c (diff)
services: nginx: Use a fixed location for the nginx configuration file.
The motivation is twofold: 1. We can ensure the presence of the nginx default configuration fragments in the configuration file directory; 2. 'herd reload nginx' can now be used to reload an updated configuration file. Before this change, 'include fastcgi_params;', for example, would fail with error: nginx: [emerg] open() "/gnu/store/fastcgi_params" failed (2: No such file or directory) in /gnu/store/...-nginx.conf:50 * gnu/services/web.scm (%nginx-configuration-file): New variable. (nginx-activation): Delay configuration file check to... (nginx-shepherd-service): ... a new one-shot 'nginx-init' service. Adjust to use the %nginx-configuration-file variable for the configuration file. <actions>: Add a new 'configuration' action. (nginx-conf-files, nginx-etc-directory): New procedures. (nginx-service-type): Extend etc-service-type with nginx-service-type. * gnu/tests/web.scm (%nginx-servers): Add an include directive to test config to ensure it now works. Merges: !8811 Change-Id: I26882ab01288ec4dd374e9f282e95ffa33dfa3cc
Diffstat (limited to 'gnu/tests')
-rw-r--r--gnu/tests/web.scm15
1 files changed, 14 insertions, 1 deletions
diff --git a/gnu/tests/web.scm b/gnu/tests/web.scm
index f29fb6b3748..c3253652887 100644
--- a/gnu/tests/web.scm
+++ b/gnu/tests/web.scm
@@ -203,8 +203,21 @@ the tests."
203(define %nginx-servers 203(define %nginx-servers
204 ;; Server blocks. 204 ;; Server blocks.
205 (list (nginx-server-configuration 205 (list (nginx-server-configuration
206 (listen '("8080"))))) 206 (listen '("8080"))
207 (locations
208 ;; Dummy location to test the default configuration path.
209 (list (nginx-location-configuration
210 (uri "/")
211 (body (list "include fastcgi_params;"))))))))
207 212
213;;; For a manual test/inspection:
214#;(
215
216$(./pre-inst-env guix system vm \
217-e '(@@ (gnu tests web) %nginx-os)' --no-graphic) \
218-nic user,model=virtio-net-pci,hostfwd=tcp::8080-:80 -m 1024
219
220)
208(define %nginx-os 221(define %nginx-os
209 ;; Operating system under test. 222 ;; Operating system under test.
210 (simple-operating-system 223 (simple-operating-system