Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] lighttpd: install fastcgi config for php
@ 2014-12-02 22:35 Ryan Coe
  2014-12-02 23:56 ` Floris Bos
  2014-12-07 22:50 ` Thomas Petazzoni
  0 siblings, 2 replies; 5+ messages in thread
From: Ryan Coe @ 2014-12-02 22:35 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Ryan Coe <bluemrp9@gmail.com>
---
 package/lighttpd/fastcgi.conf |  7 +++++++
 package/lighttpd/lighttpd.mk  | 11 +++++++++++
 2 files changed, 18 insertions(+)
 create mode 100644 package/lighttpd/fastcgi.conf

diff --git a/package/lighttpd/fastcgi.conf b/package/lighttpd/fastcgi.conf
new file mode 100644
index 0000000..2ed8bea
--- /dev/null
+++ b/package/lighttpd/fastcgi.conf
@@ -0,0 +1,7 @@
+server.modules += ( "mod_fastcgi" )
+
+fastcgi.server = ( ".php" => ((
+                     "bin-path" => "/usr/bin/php-cgi",
+                     "socket" => "/tmp/php.socket"
+                 )))
+
diff --git a/package/lighttpd/lighttpd.mk b/package/lighttpd/lighttpd.mk
index 8f34561..e4a3020 100644
--- a/package/lighttpd/lighttpd.mk
+++ b/package/lighttpd/lighttpd.mk
@@ -78,6 +78,17 @@ endef
 
 LIGHTTPD_POST_INSTALL_TARGET_HOOKS += LIGHTTPD_INSTALL_CONFIG
 
+define LIGHTTPD_INSTALL_PHP_CONFIG
+	$(INSTALL) -D -m 0644 package/lighttpd/fastcgi.conf \
+		$(TARGET_DIR)/etc/lighttpd/conf.d/fastcgi.conf
+	$(SED) 's/#include \"conf.d\/fastcgi.conf\"/include \"conf.d\/fastcgi.conf\"/' \
+		$(TARGET_DIR)/etc/lighttpd/modules.conf
+endef
+
+ifeq ($(BR2_PACKAGE_PHP_SAPI_CLI_CGI)$(BR2_PACKAGE_PHP_SAPI_CGI),y)
+	LIGHTTPD_POST_INSTALL_TARGET_HOOKS += LIGHTTPD_INSTALL_PHP_CONFIG
+endif
+
 define LIGHTTPD_INSTALL_INIT_SYSV
 	$(INSTALL) -D -m 0755 package/lighttpd/S50lighttpd \
 		$(TARGET_DIR)/etc/init.d/S50lighttpd
-- 
2.2.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-12-08  0:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-02 22:35 [Buildroot] [PATCH 1/1] lighttpd: install fastcgi config for php Ryan Coe
2014-12-02 23:56 ` Floris Bos
2014-12-07 22:50 ` Thomas Petazzoni
2014-12-07 22:56   ` Ryan Coe
2014-12-08  0:19   ` Floris Bos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox