summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_advanced_admin.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-06-17 13:53:42 -0400
committerjim-p <jimp@pfsense.org>2011-06-17 13:53:42 -0400
commitc41602e15ccb10cadb70d3295021a2208b0f4ba4 (patch)
tree49d628217e3a7d527e1675c5cf6419ed768ba3df /usr/local/www/system_advanced_admin.php
parent24cbe7a895c78ce12cde907ab4994630391567e0 (diff)
downloadpfsense-c41602e15ccb10cadb70d3295021a2208b0f4ba4.zip
pfsense-c41602e15ccb10cadb70d3295021a2208b0f4ba4.tar.gz
Add a GUI field to adjust the max number of processes for lighttpd.
Diffstat (limited to 'usr/local/www/system_advanced_admin.php')
-rw-r--r--usr/local/www/system_advanced_admin.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/usr/local/www/system_advanced_admin.php b/usr/local/www/system_advanced_admin.php
index 601bb8e..4965fb9 100644
--- a/usr/local/www/system_advanced_admin.php
+++ b/usr/local/www/system_advanced_admin.php
@@ -51,6 +51,7 @@ require_once("shaper.inc");
$pconfig['webguiproto'] = $config['system']['webgui']['protocol'];
$pconfig['webguiport'] = $config['system']['webgui']['port'];
+$pconfig['max_procs'] = ($config['system']['webgui']['max_procs']) ? $config['system']['webgui']['max_procs'] : 2;
$pconfig['ssl-certref'] = $config['system']['webgui']['ssl-certref'];
$pconfig['disablehttpredirect'] = isset($config['system']['webgui']['disablehttpredirect']);
$pconfig['disableconsolemenu'] = isset($config['system']['disableconsolemenu']);
@@ -84,6 +85,10 @@ if ($_POST) {
if(!is_port($_POST['webguiport']))
$input_errors[] = gettext("You must specify a valid webConfigurator port number");
+ if ($_POST['max_procs'])
+ if(!is_numeric($_POST['max_procs']) || ($_POST['max_procs'] < 1) || ($_POST['max_procs'] > 500))
+ $input_errors[] = gettext("Max Processes must be a number 1 or greater");
+
if ($_POST['althostnames']) {
$althosts = explode(" ", $_POST['althostnames']);
foreach ($althosts as $ah)
@@ -111,6 +116,8 @@ if ($_POST) {
$restart_webgui = true;
if (update_if_changed("webgui certificate", $config['system']['webgui']['ssl-certref'], $_POST['ssl-certref']))
$restart_webgui = true;
+ if (update_if_changed("webgui max processes", $config['system']['webgui']['max_procs'], $_POST['max_procs']))
+ $restart_webgui = true;
if ($_POST['disablehttpredirect'] == "yes") {
$config['system']['webgui']['disablehttpredirect'] = true;
@@ -322,6 +329,18 @@ function prot_change() {
</td>
</tr>
<tr>
+ <td valign="top" class="vncell"><?=gettext("Max Processes"); ?></td>
+ <td class="vtable">
+ <input name="max_procs" type="text" class="formfld unknown" id="max_procs" "size="5" value="<?=htmlspecialchars($pconfig['max_procs']);?>">
+ <br>
+ <span class="vexpl">
+ <?=gettext("Enter the number of webConfigurator processes you " .
+ "want to run. This defaults to 2. Increasing this will allow more " .
+ "users/browsers to access the GUI concurrently."); ?>
+ </span>
+ </td>
+ </tr>
+ <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("WebGUI redirect"); ?></td>
<td width="78%" class="vtable">
<input name="disablehttpredirect" type="checkbox" id="disablehttpredirect" value="yes" <?php if ($pconfig['disablehttpredirect']) echo "checked"; ?> />
OpenPOWER on IntegriCloud