From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 20 12:44:21 2018 Received: (at submit) by debbugs.gnu.org; 20 Oct 2018 16:44:21 +0000 Received: from localhost ([127.0.0.1]:33395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gDuMO-00089e-M9 for submit@debbugs.gnu.org; Sat, 20 Oct 2018 12:44:20 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60437) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gDuMN-00089R-0c for submit@debbugs.gnu.org; Sat, 20 Oct 2018 12:44:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gDuMG-0002Xt-Gb for submit@debbugs.gnu.org; Sat, 20 Oct 2018 12:44:13 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:55851) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gDuMG-0002XC-9E for submit@debbugs.gnu.org; Sat, 20 Oct 2018 12:44:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41756) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDuMF-0007b6-0B for guix-patches@gnu.org; Sat, 20 Oct 2018 12:44:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gDuMB-0002PD-QD for guix-patches@gnu.org; Sat, 20 Oct 2018 12:44:10 -0400 Received: from pelzflorian.de ([5.45.111.108]:37986 helo=mail.pelzflorian.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gDuMB-0002Mo-Fq for guix-patches@gnu.org; Sat, 20 Oct 2018 12:44:07 -0400 Received: from florianbeaglebone.fritz.box (unknown [91.67.78.16]) by mail.pelzflorian.de (Postfix) with ESMTPSA id A2841360077 for ; Sat, 20 Oct 2018 18:44:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1540053845; bh=Y1qskUIrQ6CYBngqtRNkzKlQlHdNLmyLSiw1c84XnZI=; h=Date:From:To:Subject; b=B/HHXhGrMV0+cfs7ydAuiY8Pdc2yDL4ivttWqMf27R4W8hXFY2FqeWoWRlzY+j15o ZvBpW8M+Iv8kdMcZ93/GYyy0wKe/ftplkiUG2UkcaUW4fJ5YSmn5wbXmgeeUic59dU XqqxjoDFW8jNDrosvr9tzi2FXM5EqIuvIJlWkuso= Date: Sat, 20 Oct 2018 18:44:03 +0200 From: Florian Pelz To: guix-patches@gnu.org Subject: [PATCH] services: httpd: Allow using it with PHP. Message-ID: <20181020164401.ylh63egrl4mbz3qb@florianbeaglebone.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: NeoMutt/20180716 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.1 (-----) * gnu/services/web.scm (httpd): Make existing httpd-module API public. * doc/guix.texi (Apache HTTP Server): Document its usage with PHP-FPM. --- doc/guix.texi | 31 +++++++++++++++++++++++++++++++ gnu/services/web.scm | 5 +++++ 2 files changed, 36 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index f4f19949f..58c2cd7f5 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -50,6 +50,7 @@ Copyright @copyright{} 2018 Oleg Pykhalov@* Copyright @copyright{} 2018 Mike Gerwitz@* Copyright @copyright{} 2018 Pierre-Antoine Rouby@* Copyright @copyright{} 2018 G=C3=A1bor Boskovits@* +Copyright @copyright{} 2018 Florian Pelz@* =20 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -16595,6 +16596,10 @@ within the store, for example @code{(file-append= mod-wsgi @end table @end deffn =20 +@defvr {Scheme Variable} %default-httpd-modules +A default list of @code{httpd-module} objects. +@end defvr + @deffn {Data Type} httpd-config-file This data type represents a configuration file for the httpd service. =20 @@ -16603,6 +16608,32 @@ This data type represents a configuration file f= or the httpd service. The modules to load. Additional modules can be added here, or loaded by additional configuration. =20 +For example, in order to handle requests for PHP files, you can use Apac= he=E2=80=99s +@code{mod_proxy_fcgi} module along with @code{php-fpm-service-type}: + +@example +(service httpd-service-type + (httpd-configuration + (config + (httpd-config-file + (modules (cons* + (httpd-module + (name "proxy_module") + (file "modules/mod_proxy.so")) + (httpd-module + (name "proxy_fcgi_module") + (file "modules/mod_proxy_fcgi.so")) + %default-httpd-modules)) + (extra-config (list "\ + + SetHandler \"proxy:unix:/var/run/php-fpm.sock|fcgi://localhost/\" +")))))) +(service php-fpm-service-type + (php-fpm-configuration + (socket "/var/run/php-fpm.sock") + (socket-group "httpd"))) +@end example + @item @code{server-root} (default: @code{httpd}) The @code{ServerRoot} in the configuration file, defaults to the httpd package. Directives including @code{Include} and @code{LoadModule} are diff --git a/gnu/services/web.scm b/gnu/services/web.scm index 1edb1f4d3..fcf453c24 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -70,6 +70,11 @@ httpd-config-file-user httpd-config-file-group =20 + + httpd-module + httpd-module? + %default-httpd-modules + httpd-service-type =20 --=20 2.19.1 From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 25 16:23:24 2018 Received: (at 33104) by debbugs.gnu.org; 25 Oct 2018 20:23:25 +0000 Received: from localhost ([127.0.0.1]:42898 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFmA8-0006jf-Ln for submit@debbugs.gnu.org; Thu, 25 Oct 2018 16:23:24 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFmA7-0006jS-Ew for 33104@debbugs.gnu.org; Thu, 25 Oct 2018 16:23:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gFm9v-0004a5-4q for 33104@debbugs.gnu.org; Thu, 25 Oct 2018 16:23:14 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53027) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFm9v-0004Zp-1P; Thu, 25 Oct 2018 16:23:11 -0400 Received: from 50.135.159.77.rev.sfr.net ([77.159.135.50]:39770 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gFm9u-0000kJ-8f; Thu, 25 Oct 2018 16:23:10 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Florian Pelz , Christopher Baines Subject: Re: [bug#33104] [PATCH] services: httpd: Allow using it with PHP. References: <20181020164401.ylh63egrl4mbz3qb@florianbeaglebone.fritz.box> Date: Thu, 25 Oct 2018 22:23:07 +0200 In-Reply-To: <20181020164401.ylh63egrl4mbz3qb@florianbeaglebone.fritz.box> (Florian Pelz's message of "Sat, 20 Oct 2018 18:44:03 +0200") Message-ID: <87h8h9srmc.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 33104 Cc: 33104@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) Hi Florian! Florian Pelz skribis: > * gnu/services/web.scm (httpd): Make existing httpd-module API public. > * doc/guix.texi (Apache HTTP Server): Document its usage with PHP-FPM. At first sight this LGTM but I=E2=80=99m no expert. Chris, WDYT? Please a= pply if it looks good to you! Thank you, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 27 09:16:29 2018 Received: (at 33104-done) by debbugs.gnu.org; 27 Oct 2018 13:16:29 +0000 Received: from localhost ([127.0.0.1]:44717 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGOS5-0004bk-KX for submit@debbugs.gnu.org; Sat, 27 Oct 2018 09:16:29 -0400 Received: from li622-129.members.linode.com ([212.71.249.129]:43696 helo=mira.cbaines.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGOS3-0004bc-R6 for 33104-done@debbugs.gnu.org; Sat, 27 Oct 2018 09:16:28 -0400 Received: by mira.cbaines.net (Postfix, from userid 113) id 0176E1662E; Sat, 27 Oct 2018 14:16:27 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (127.103.9.51.dyn.plus.net [51.9.103.127]) by mira.cbaines.net (Postfix) with ESMTPSA id 988CB16528; Sat, 27 Oct 2018 14:16:26 +0100 (BST) Received: from phact (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 57dba8da; Sat, 27 Oct 2018 13:16:26 +0000 (UTC) References: <20181020164401.ylh63egrl4mbz3qb@florianbeaglebone.fritz.box> <87h8h9srmc.fsf@gnu.org> User-agent: mu4e 1.0; emacs 26.1 From: Christopher Baines To: Florian Pelz Subject: Re: [bug#33104] [PATCH] services: httpd: Allow using it with PHP. In-reply-to: <87h8h9srmc.fsf@gnu.org> Date: Sat, 27 Oct 2018 14:16:23 +0100 Message-ID: <87d0rvwmvs.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 33104-done Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , 33104-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Hi Florian! > > Florian Pelz skribis: > >> * gnu/services/web.scm (httpd): Make existing httpd-module API public. >> * doc/guix.texi (Apache HTTP Server): Document its usage with PHP-FPM. > > At first sight this LGTM but I=E2=80=99m no expert. Chris, WDYT? Please= apply > if it looks good to you! Hey both, Thanks for this patch Florian, it looks like a good change to make, and I've now applied it. I think when I was writing the httpd service originally, I ended up just sticking the module loading in the extra configuration, but this looks like a good way of handling it. Thanks again, Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlvUZSdfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XdnlRAAlkGA42mhvp8U16mEwxDXcqGbIOde58ohdMqTEwUOz3ZtsbaHBBMgpbuj BqDRBnjBoqHEVRQZMcwI+leNJOUCEUyLIXd8fDBxH9pBhhib5E+I0fcud4egLeVX dHvPOiNMizq2Q2C/3RAC56Fm2oT7ls8t8gtw/cNiZT2mYkIXx7v5sumqAkm99RZB GwYeMaR3Ew7Dkn6JP4UqNfFZyCeDOohYC0j7okjlCpkH3MzlEIRIGO7IqTA63K3N eoD9slpglgD/0ku7lK2Scm6vSxSsqBXFe6wxKQ6IKikZ2W7aIB7MN0Epf3fwWGPC pdvaeE7RfTA28lwUgdZbvo0PfivRjQvlbflGZHxXzsOAOPPav9FIhB8F+VkiVpda iPp68bBbLQ0RyN9nkf6EVuOtk4nCsxAfEUvPbLGOMD3I7+dWRQQXQw8Evaz/274H So3J7Va6aBEPURtQTdMxmt++GYj7G/vdDPNPT72z2IngUgPejCiGHeZ4HjZgaRd4 JLkwfEX3pmNsfcnOZWKFpvQnl9a5rdBAf96ZB1vZ9tc+qRnSp950NQf2fOVTWGR1 mmWO/ejZZYroHzR2AeAGq5XZCA1novsQoddbJxYYen7p+BtWAN2HHFI7kaZ6JInu nQZKNvNW5BJVEN0LTaz/49cmfWtWSiTFX1SxaqVje7jfvp3YUMk= =Wajh -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 27 10:59:12 2018 Received: (at 33104) by debbugs.gnu.org; 27 Oct 2018 14:59:12 +0000 Received: from localhost ([127.0.0.1]:45612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGQ3U-00033A-Lt for submit@debbugs.gnu.org; Sat, 27 Oct 2018 10:59:12 -0400 Received: from pelzflorian.de ([5.45.111.108]:42146 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGQ3S-000331-9y for 33104@debbugs.gnu.org; Sat, 27 Oct 2018 10:59:10 -0400 Received: from florianbeaglebone.fritz.box (ip5b434e10.dynamic.kabel-deutschland.de [91.67.78.16]) by mail.pelzflorian.de (Postfix) with ESMTPSA id 38A49360076; Sat, 27 Oct 2018 16:59:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1540652348; bh=XHQMVcHK38T0JLtEEmYcoyUU0G+dusb6hdxMxYOiQog=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=WMi7vmOPLoQ4JGa7N6dj/YfrsLzCN/cfby8UjKTAfWRoNLKt+53kHay/PkpfLGt1N XRTXoH4X2SLs/KT2AZbleHEzkQa0S1nEZ4Is5H2WpPklDjmKdDcjZPlKIiL8a/1eCH 7Mb3BZXfXkdkmVbwI3xh1Hf7zXX9y8UYPhbht7mU= Date: Sat, 27 Oct 2018 16:59:06 +0200 From: "pelzflorian (Florian Pelz)" To: Christopher Baines Subject: Re: [bug#33104] [PATCH] services: httpd: Allow using it with PHP. Message-ID: <20181027145906.nelsvh2zq3xz6emu@florianbeaglebone.fritz.box> References: <20181020164401.ylh63egrl4mbz3qb@florianbeaglebone.fritz.box> <87h8h9srmc.fsf@gnu.org> <87d0rvwmvs.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87d0rvwmvs.fsf@cbaines.net> User-Agent: NeoMutt/20180716 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 33104 Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , 33104@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Thank you! On Sat, Oct 27, 2018 at 02:16:23PM +0100, Christopher Baines wrote: > I think when I was writing the httpd service originally, I ended up just > sticking the module loading in the extra configuration, but this looks > like a good way of handling it. > Your original httpd service had a modules field, it was already documented in the Guix manual, only the httpd-module was not public API and the field was therefore unusable. Regards, Florian From unknown Fri Jun 13 11:00:59 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 25 Nov 2018 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator