diff options
author | Chris Buechler <cmb@pfsense.org> | 2015-12-30 22:00:34 -0600 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-01-05 09:08:10 -0200 |
commit | c4a278f2acd1b4df900eb6d6901a3d425887ec00 (patch) | |
tree | afd60a45628deb999384a5f66c4b35b47d8cebde /src/etc/inc | |
parent | f77f43ff9113f2b28a7a836d05e372e5618dde1f (diff) | |
download | pfsense-c4a278f2acd1b4df900eb6d6901a3d425887ec00.zip pfsense-c4a278f2acd1b4df900eb6d6901a3d425887ec00.tar.gz |
start switching CP to nginx
Diffstat (limited to 'src/etc/inc')
-rw-r--r-- | src/etc/inc/captiveportal.inc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/etc/inc/captiveportal.inc b/src/etc/inc/captiveportal.inc index 0730962..53e6034 100644 --- a/src/etc/inc/captiveportal.inc +++ b/src/etc/inc/captiveportal.inc @@ -417,35 +417,35 @@ function captiveportal_init_webgui_zone($cpcfg) { $key = base64_decode($cert['prv']); $ca = ca_chain($cert); - /* generate lighttpd configuration */ + /* generate nginx configuration */ if (!empty($cpcfg['listenporthttps'])) { $listenporthttps = $cpcfg['listenporthttps']; } else { $listenporthttps = 8001 + $cpcfg['zoneid']; } - system_generate_lighty_config("{$g['varetc_path']}/lighty-{$cpzone}-CaptivePortal-SSL.conf", - $crt, $key, $ca, "lighty-{$cpzone}-CaptivePortal-SSL.pid", $listenporthttps, "/usr/local/captiveportal", + system_generate_nginx_config("{$g['varetc_path']}/nginx-{$cpzone}-CaptivePortal-SSL.conf", + $crt, $key, $ca, "nginx-{$cpzone}-CaptivePortal-SSL.pid", $listenporthttps, "/usr/local/captiveportal", "cert-{$cpzone}-portal.pem", "ca-{$cpzone}-portal.pem", $cpzone); } - /* generate lighttpd configuration */ + /* generate nginx configuration */ if (!empty($cpcfg['listenporthttp'])) { $listenporthttp = $cpcfg['listenporthttp']; } else { $listenporthttp = 8000 + $cpcfg['zoneid']; } - system_generate_lighty_config("{$g['varetc_path']}/lighty-{$cpzone}-CaptivePortal.conf", - "", "", "", "lighty-{$cpzone}-CaptivePortal.pid", $listenporthttp, "/usr/local/captiveportal", + system_generate_nginx_config("{$g['varetc_path']}/nginx-{$cpzone}-CaptivePortal.conf", + "", "", "", "nginx-{$cpzone}-CaptivePortal.pid", $listenporthttp, "/usr/local/captiveportal", "", "", $cpzone); - @unlink("{$g['varrun']}/lighty-{$cpzone}-CaptivePortal.pid"); - /* attempt to start lighttpd */ - $res = mwexec("/usr/local/sbin/lighttpd -f {$g['varetc_path']}/lighty-{$cpzone}-CaptivePortal.conf"); + @unlink("{$g['varrun']}/nginx-{$cpzone}-CaptivePortal.pid"); + /* attempt to start nginx */ + $res = mwexec("/usr/local/sbin/nginx -c {$g['varetc_path']}/lighty-{$cpzone}-CaptivePortal.conf"); /* fire up https instance */ if (isset($cpcfg['httpslogin'])) { - @unlink("{$g['varrun']}/lighty-{$cpzone}-CaptivePortal-SSL.pid"); - $res = mwexec("/usr/local/sbin/lighttpd -f {$g['varetc_path']}/lighty-{$cpzone}-CaptivePortal-SSL.conf"); + @unlink("{$g['varrun']}/nginx-{$cpzone}-CaptivePortal-SSL.pid"); + $res = mwexec("/usr/local/sbin/nginx -c {$g['varetc_path']}/nginx-{$cpzone}-CaptivePortal-SSL.conf"); } } |