diff options
| author | Christopher Baines <mail@cbaines.net> | 2017-12-12 06:48:48 +0000 |
|---|---|---|
| committer | Christopher Baines <mail@cbaines.net> | 2018-01-17 08:43:47 +0000 |
| commit | d067e4badcaa705d8cb68d81c534ba69c3fa6e13 (patch) | |
| tree | 4fcc94241fdfe194f22304aaf39cf55672c33395 /gnu/tests/web.scm | |
| parent | d9b530813f6d90d4aec320fd2f362d46b11a0125 (diff) | |
gnu: services: web: Add service for httpd.
* gnu/services/web.scm (<httpd-module>,
<httpd-config-file>, <httpd-virtualhost>
<httpd-configuration>): New record types.
(%default-httpd-modules, %httpd-accounts,
httpd-service-type): New variables.
(httpd-shepherd-services, httpd-activation,
httpd-process-extensions): New procedures.
* gnu/tests/web.scm (run-httpd-test): New procedure.
(%httpd-os, %tests-httpd): New variables.
* doc/guix.texi (Web Services): Document the Apache HTTP Server.
Diffstat (limited to 'gnu/tests/web.scm')
| -rw-r--r-- | gnu/tests/web.scm | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/gnu/tests/web.scm b/gnu/tests/web.scm index 5595e9ddf9b..1912f8f79d1 100644 --- a/gnu/tests/web.scm +++ b/gnu/tests/web.scm | |||
| @@ -29,7 +29,8 @@ | |||
| 29 | #:use-module (gnu services networking) | 29 | #:use-module (gnu services networking) |
| 30 | #:use-module (guix gexp) | 30 | #:use-module (guix gexp) |
| 31 | #:use-module (guix store) | 31 | #:use-module (guix store) |
| 32 | #:export (%test-nginx | 32 | #:export (%test-httpd |
| 33 | %test-nginx | ||
| 33 | %test-php-fpm)) | 34 | %test-php-fpm)) |
| 34 | 35 | ||
| 35 | (define %index.html-contents | 36 | (define %index.html-contents |
| @@ -114,6 +115,29 @@ HTTP-PORT." | |||
| 114 | 115 | ||
| 115 | 116 | ||
| 116 | ;;; | 117 | ;;; |
| 118 | ;;; HTTPD | ||
| 119 | ;;; | ||
| 120 | |||
| 121 | (define %httpd-os | ||
| 122 | (simple-operating-system | ||
| 123 | (dhcp-client-service) | ||
| 124 | (service httpd-service-type | ||
| 125 | (httpd-configuration | ||
| 126 | (config | ||
| 127 | (httpd-config-file | ||
| 128 | (listen '("8080")))))) | ||
| 129 | (simple-service 'make-http-root activation-service-type | ||
| 130 | %make-http-root))) | ||
| 131 | |||
| 132 | (define %test-httpd | ||
| 133 | (system-test | ||
| 134 | (name "httpd") | ||
| 135 | (description "Connect to a running HTTPD server.") | ||
| 136 | (value (run-webserver-test name %httpd-os | ||
| 137 | #:log-file "/var/log/httpd/error_log")))) | ||
| 138 | |||
| 139 | |||
| 140 | ;;; | ||
| 117 | ;;; NGINX | 141 | ;;; NGINX |
| 118 | ;;; | 142 | ;;; |
| 119 | 143 | ||
