summaryrefslogtreecommitdiffstats
path: root/etc/inc/captiveportal.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-09-18 02:21:42 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-09-18 02:21:42 +0000
commit3a66b6211b8d06e494fb4ac73da5d59eacd4529d (patch)
tree30e611c8c384248e7e3bb2c68618b79347eeb0df /etc/inc/captiveportal.inc
parentb701357d0f0d202f5828552c4829ff846ed25377 (diff)
downloadpfsense-3a66b6211b8d06e494fb4ac73da5d59eacd4529d.zip
pfsense-3a66b6211b8d06e494fb4ac73da5d59eacd4529d.tar.gz
* Additional tuning parms
* Support captive portal SSL
Diffstat (limited to 'etc/inc/captiveportal.inc')
-rw-r--r--etc/inc/captiveportal.inc26
1 files changed, 12 insertions, 14 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc
index fd9211d..e668cd5 100644
--- a/etc/inc/captiveportal.inc
+++ b/etc/inc/captiveportal.inc
@@ -154,21 +154,13 @@ EOD;
/* start web server */
// mwexec("/usr/local/sbin/mini_httpd -a -M 0 -u root -maxproc 16" .
// " -p 8000 -i {$g['varrun_path']}/mini_httpd.cp.pid");
-
- /* generate lighttpd configuration */
- system_generate_lighty_config("{$g['varetc_path']}/lighty-CaptivePortal.conf",
- $key, $cert, "lighty-CaptivePortal.pid", "8000", "/usr/local/captiveportal/");
- /* attempt to start lighthttpd */
- $res = mwexec("/usr/local/sbin/lighttpd -f {$g['varetc_path']}/lighty-CaptivePortal.conf");
-
- /* fire up another one for HTTPS if requested */
+ $cert = "";
+ $key = "";
if (isset($config['captiveportal']['httpslogin']) &&
$config['captiveportal']['certificate'] && $config['captiveportal']['private-key']) {
-
$cert = base64_decode($config['captiveportal']['certificate']);
$key = base64_decode($config['captiveportal']['private-key']);
-
$fd = fopen("{$g['varetc_path']}/cert-portal.pem", "w");
if (!$fd) {
printf("Error: cannot open cert-portal.pem in system_webgui_start().\n");
@@ -179,12 +171,18 @@ EOD;
fwrite($fd, "\n");
fwrite($fd, $key);
fclose($fd);
-
- mwexec("/usr/local/sbin/mini_httpd -S -a -M 0 -E {$g['varetc_path']}/cert-portal.pem" .
- " -u root -maxproc 16 -p 8001" .
- " -i {$g['varrun_path']}/mini_httpd.cps.pid");
+
+
}
+ /* generate lighttpd configuration */
+ system_generate_lighty_config("{$g['varetc_path']}/lighty-CaptivePortal.conf",
+ $key, $cert, "lighty-CaptivePortal.pid", "8000", "/usr/local/captiveportal/",
+ "cert-portal.pem");
+
+ /* attempt to start lighthttpd */
+ $res = mwexec("/usr/local/sbin/lighttpd -f {$g['varetc_path']}/lighty-CaptivePortal.conf");
+
/* generate passthru mac database */
captiveportal_passthrumac_configure();
/* create allowed ip database and insert ipfw rules to make it so */
OpenPOWER on IntegriCloud