From 6c2c691b40de0032fe7f68fd81abfd07487c7341 Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Tue, 26 Apr 2016 21:05:20 +0200 Subject: [PATCH] PHP feature: We ship it disabled per default. - User needs to opt-in - Unrestricted, execution, currently Fixed #130 --- .../piratebox/conf/lighttpd/fastcgi.conf | 25 ------------------- .../piratebox/conf/lighttpd/lighttpd.conf | 8 +++++- 2 files changed, 7 insertions(+), 26 deletions(-) delete mode 100644 piratebox/piratebox/conf/lighttpd/fastcgi.conf diff --git a/piratebox/piratebox/conf/lighttpd/fastcgi.conf b/piratebox/piratebox/conf/lighttpd/fastcgi.conf deleted file mode 100644 index 87ba268..0000000 --- a/piratebox/piratebox/conf/lighttpd/fastcgi.conf +++ /dev/null @@ -1,25 +0,0 @@ -#-------------------- FAST CGI stuff - -server.modules += ( "mod_fastcgi" ) -fastcgi.server = ( - ".php" => (( - "bin-path" => "/usr/bin/php-cgi", - "socket" => "/tmp/php.socket", - "max-procs" => 1 - )) -) - -# Run a specific php script when the URL /generate_204 is requested. -# Android clients request this URL to check for a full working -# internet connection, we want to fake a reply. This config section is -# a hack to make a php script without the ".php" extension work when -# mod_rewrite is not available. -$HTTP["url"] =~ "^/generate_204$" { - fastcgi.server = ( - "" => (( - "bin-path" => "/usr/bin/php-cgi", - "socket" => "/tmp/php.socket", - "max-procs" => 1 - )) - ) -} diff --git a/piratebox/piratebox/conf/lighttpd/lighttpd.conf b/piratebox/piratebox/conf/lighttpd/lighttpd.conf index eccf386..cf20728 100644 --- a/piratebox/piratebox/conf/lighttpd/lighttpd.conf +++ b/piratebox/piratebox/conf/lighttpd/lighttpd.conf @@ -7,6 +7,7 @@ server.modules = ( "mod_redirect", # "mod_rewrite", "mod_setenv", + "mod_fastcgi" ) server.document-root = "/opt/piratebox/www" @@ -114,4 +115,9 @@ $HTTP["useragent"] =~ "CaptiveNetworkSupport" { server.error-handler-404 = "/success.html" } -include "/opt/piratebox/conf/lighttpd/fastcgi.conf" + +include "/opt/piratebox/conf/lighttpd/fastcgi-php-generate203.conf" + +## Uncommenting the following line enables PHP for the +## complete PirateBox +#include "/opt/piratebox/conf/lighttpd/fastcgi-php.conf"