From 7086c581bff2f7df9f2eb6cd257087fc00bb1350 Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Sun, 2 Jul 2017 09:18:58 +0200 Subject: [PATCH] captive: switch over to new captive portal feature --- .../conf/lighttpd/fastcgi-php-generate203.conf | 16 ---------------- piratebox/piratebox/conf/lighttpd/iOS7-fix.conf | 10 ---------- piratebox/piratebox/conf/lighttpd/lighttpd.conf | 7 ++----- 3 files changed, 2 insertions(+), 31 deletions(-) delete mode 100644 piratebox/piratebox/conf/lighttpd/fastcgi-php-generate203.conf delete mode 100644 piratebox/piratebox/conf/lighttpd/iOS7-fix.conf diff --git a/piratebox/piratebox/conf/lighttpd/fastcgi-php-generate203.conf b/piratebox/piratebox/conf/lighttpd/fastcgi-php-generate203.conf deleted file mode 100644 index 4f1d6e5..0000000 --- a/piratebox/piratebox/conf/lighttpd/fastcgi-php-generate203.conf +++ /dev/null @@ -1,16 +0,0 @@ -#-------------------- FAST CGI stuff - -# 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/iOS7-fix.conf b/piratebox/piratebox/conf/lighttpd/iOS7-fix.conf deleted file mode 100644 index 8164304..0000000 --- a/piratebox/piratebox/conf/lighttpd/iOS7-fix.conf +++ /dev/null @@ -1,10 +0,0 @@ -# Fix for iOS7 -# It ask especially different domains without a specific URL. -# It want to get a "success" message, to allow full system/internet access -$HTTP["useragent"] =~ "CaptiveNetworkSupport" { - server.document-root = "/opt/piratebox/www/library/test/" - index-file.names = ( "success.html" ) - dir-listing.activate = "disable" - server.error-handler-404 = "/success.html" -} - diff --git a/piratebox/piratebox/conf/lighttpd/lighttpd.conf b/piratebox/piratebox/conf/lighttpd/lighttpd.conf index 28f9663..fb4f2f7 100644 --- a/piratebox/piratebox/conf/lighttpd/lighttpd.conf +++ b/piratebox/piratebox/conf/lighttpd/lighttpd.conf @@ -78,11 +78,8 @@ include "/opt/piratebox/conf/lighttpd/all-redirect.conf" #server.modules += ( "mod_accesslog" ) #accesslog.filename = "/opt/piratebox/tmp/access.log" - -# Fix for iOS7 -include "/opt/piratebox/conf/lighttpd/iOS7-fix.conf" - -include "/opt/piratebox/conf/lighttpd/fastcgi-php-generate203.conf" +# Captive Portal fake answers +include "/opt/piratebox/conf/lighttpd/captive_portal.conf" ## Uncommenting the following line enables PHP for the ## complete PirateBox