diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc index 66b0c917e7..2108edb8f6 100644 --- a/src/etc/inc/system.inc +++ b/src/etc/inc/system.inc @@ -1237,6 +1237,14 @@ function system_generate_nginx_config($filename, } } + if (!isset($config['syslog']['nologlighttpd'])) { + $nginx_use_syslog = <<http://www.freebsd.org)
©.

- http://www.php.net.
- ©
+ http://www.php.net.
+ © .

- (http://www.nginx.org)
- © + (http://www.lighttpd.net)
+ ©

(http://www.isc.org/products/DHCP)
diff --git a/src/usr/local/www/status_logs.php b/src/usr/local/www/status_logs.php index 5a3075386b..adf5ecccb8 100755 --- a/src/usr/local/www/status_logs.php +++ b/src/usr/local/www/status_logs.php @@ -156,6 +156,8 @@ $pconfig['logfilesize'] = $config['syslog'][$specific_log]['logfilesize']; $pconfig['format'] = $config['syslog'][$specific_log]['format']; # System General (main) Specific +$pconfig['loglighttpd'] = !isset($config['syslog']['nologlighttpd']); + $save_settings = getGETPOSTsettingvalue('save_settings', null); if ($save_settings) { @@ -166,6 +168,9 @@ if ($save_settings) { $logfilesize = getGETPOSTsettingvalue('logfilesize', null); $format = getGETPOSTsettingvalue('format', null); + # System General (main) Specific + $loglighttpd = getGETPOSTsettingvalue('loglighttpd', null); + unset($input_errors); $pconfig = $_POST; @@ -207,6 +212,17 @@ if ($save_settings) { $config['syslog'][$specific_log]['format'] = $format; } + # System General (main) Specific + if ($logfile == 'system') { + $oldnologlighttpd = isset($config['syslog']['nologlighttpd']); + $config['syslog']['nologlighttpd'] = $loglighttpd ? false : true; + + if ($oldnologlighttpd !== $config['syslog']['nologlighttpd']) { + $logging_changed = $lighttpd_logging_changed = true; + } + } + + // If any of the logging settings were changed then backup and sync (standard write_config). Otherwise only write config (don't backup, don't sync). if ($logging_changed) { write_config($desc = "Log Display Settings Saved: " . gettext($allowed_logs[$logfile]["name"]), $backup = true, $write_config_only = false); @@ -218,6 +234,16 @@ if ($save_settings) { $savemsg = gettext("The changes have been applied successfully."); + # System General (main) Specific + if ($logfile == 'system') { + if ($lighttpd_logging_changed) { + ob_flush(); + flush(); + log_error(gettext("webConfigurator configuration has changed. Restarting webConfigurator.")); + send_event("service restart webgui"); + $savemsg .= "
" . gettext("WebGUI process is restarting."); + } + } } } @@ -607,6 +633,18 @@ $group->add(new Form_Checkbox( $group->setHelp('Show the log entries as formatted or raw output as generated by the service. The raw output will reveal more detailed information, but it is more difficult to read.'); $section->add($group); + +# System General (main) Specific +if ($logfile == 'system') { + $section->addInput(new Form_Checkbox( + 'loglighttpd', + 'Web Server Log', + 'Log errors from the web server process', + $pconfig['loglighttpd'] + ))->setHelp('If this is checked, errors from the lighttpd web server process for the GUI or Captive Portal will appear in the system log.'); +} + + $group = new Form_Group('Action'); $btnsavesettings = new Form_Button( diff --git a/src/usr/local/www/status_logs_filter.php b/src/usr/local/www/status_logs_filter.php index 7ff5efb804..cd3117ee8e 100644 --- a/src/usr/local/www/status_logs_filter.php +++ b/src/usr/local/www/status_logs_filter.php @@ -164,6 +164,9 @@ $pconfig['nentries'] = $config['syslog'][$specific_log]['nentries']; $pconfig['logfilesize'] = $config['syslog'][$specific_log]['logfilesize']; $pconfig['format'] = $config['syslog'][$specific_log]['format']; +# System General (main) Specific +$pconfig['loglighttpd'] = !isset($config['syslog']['nologlighttpd']); + # Firewall Specific $pconfig['logdefaultblock'] = !isset($config['syslog']['nologdefaultblock']); $pconfig['logdefaultpass'] = isset($config['syslog']['nologdefaultpass']); @@ -181,6 +184,9 @@ if ($save_settings) { $logfilesize = getGETPOSTsettingvalue('logfilesize', null); $format = getGETPOSTsettingvalue('format', null); + # System General (main) Specific + $loglighttpd = getGETPOSTsettingvalue('loglighttpd', null); + # Firewall Specific $logdefaultblock = getGETPOSTsettingvalue('logdefaultblock', null); $logdefaultpass = getGETPOSTsettingvalue('logdefaultpass', null); @@ -228,6 +234,16 @@ if ($save_settings) { $config['syslog'][$specific_log]['format'] = $format; } + # System General (main) Specific + if ($logfile == 'system') { + $oldnologlighttpd = isset($config['syslog']['nologlighttpd']); + $config['syslog']['nologlighttpd'] = $loglighttpd ? false : true; + + if ($oldnologlighttpd !== $config['syslog']['nologlighttpd']) { + $logging_changed = $lighttpd_logging_changed = true; + } + } + # Firewall Specific if ($logfile == 'filter') { $oldnologdefaultblock = isset($config['syslog']['nologdefaultblock']); @@ -267,6 +283,17 @@ if ($save_settings) { $savemsg = gettext("The changes have been applied successfully."); + # System General (main) Specific + if ($logfile == 'system') { + if ($lighttpd_logging_changed) { + ob_flush(); + flush(); + log_error(gettext("webConfigurator configuration has changed. Restarting webConfigurator.")); + send_event("service restart webgui"); + $savemsg .= "
" . gettext("WebGUI process is restarting."); + } + } + # Firewall Specific if ($logfile == 'filter') { if ($firewall_logging_changed) { @@ -859,6 +886,18 @@ $group->add(new Form_Checkbox( $group->setHelp('Show the log entries as formatted or raw output as generated by the service. The raw output will reveal more detailed information, but it is more difficult to read.'); $section->add($group); + +# System General (main) Specific +if ($logfile == 'system') { + $section->addInput(new Form_Checkbox( + 'loglighttpd', + 'Web Server Log', + 'Log errors from the web server process', + $pconfig['loglighttpd'] + ))->setHelp('If this is checked, errors from the lighttpd web server process for the GUI or Captive Portal will appear in the system log.'); +} + + # Firewall Specific if ($logfile == 'filter') { $section->addInput(new Form_Checkbox( diff --git a/src/usr/local/www/status_logs_settings.php b/src/usr/local/www/status_logs_settings.php index 384917fdba..8fa193afc7 100644 --- a/src/usr/local/www/status_logs_settings.php +++ b/src/usr/local/www/status_logs_settings.php @@ -89,6 +89,7 @@ $pconfig['logdefaultblock'] = !isset($config['syslog']['nologdefaultblock']); $pconfig['logdefaultpass'] = isset($config['syslog']['nologdefaultpass']); $pconfig['logbogons'] = !isset($config['syslog']['nologbogons']); $pconfig['logprivatenets'] = !isset($config['syslog']['nologprivatenets']); +$pconfig['loglighttpd'] = !isset($config['syslog']['nologlighttpd']); $pconfig['rawfilter'] = isset($config['syslog']['rawfilter']); $pconfig['filterdescriptions'] = $config['syslog']['filterdescriptions']; $pconfig['disablelocallogging'] = isset($config['syslog']['disablelocallogging']); @@ -162,10 +163,12 @@ if ($_POST['resetlogs'] == gettext("Reset Log Files")) { $oldnologdefaultpass = isset($config['syslog']['nologdefaultpass']); $oldnologbogons = isset($config['syslog']['nologbogons']); $oldnologprivatenets = isset($config['syslog']['nologprivatenets']); + $oldnologlighttpd = isset($config['syslog']['nologlighttpd']); $config['syslog']['nologdefaultblock'] = $_POST['logdefaultblock'] ? false : true; $config['syslog']['nologdefaultpass'] = $_POST['logdefaultpass'] ? true : false; $config['syslog']['nologbogons'] = $_POST['logbogons'] ? false : true; $config['syslog']['nologprivatenets'] = $_POST['logprivatenets'] ? false : true; + $config['syslog']['nologlighttpd'] = $_POST['loglighttpd'] ? false : true; $config['syslog']['rawfilter'] = $_POST['rawfilter'] ? true : false; if (is_numeric($_POST['filterdescriptions']) && $_POST['filterdescriptions'] > 0) { $config['syslog']['filterdescriptions'] = $_POST['filterdescriptions']; @@ -191,6 +194,14 @@ if ($_POST['resetlogs'] == gettext("Reset Log Files")) { $savemsg = get_std_save_message($retval); + if ($oldnologlighttpd !== isset($config['syslog']['nologlighttpd'])) { + ob_flush(); + flush(); + log_error(gettext("webConfigurator configuration has changed. Restarting webConfigurator.")); + send_event("service restart webgui"); + $savemsg .= "
" . gettext("WebGUI process is restarting."); + } + filter_pflog_start(true); } } @@ -287,6 +298,13 @@ $section->addInput(new Form_Checkbox( $pconfig['logprivatenets'] )); +$section->addInput(new Form_Checkbox( + 'loglighttpd', + 'Web Server Log', + 'Log errors from the web server process', + $pconfig['loglighttpd'] +))->setHelp('If this is checked, errors from the lighttpd web server process for the GUI or Captive Portal will appear in the main system log'); + $section->addInput(new Form_Checkbox( 'rawfilter', 'Raw Logs', diff --git a/tools/conf/pfPorts/make.conf b/tools/conf/pfPorts/make.conf index 10b79fbc55..9272ea310f 100644 --- a/tools/conf/pfPorts/make.conf +++ b/tools/conf/pfPorts/make.conf @@ -4,6 +4,8 @@ OPTIONS_UNSET_FORCE= X11 DOCS EXAMPLES MAN INFO MANPAGES # Individual ports options www_elinks_UNSET_FORCE= FASTMEM +www_lighttpd_SET_FORCE= NODELAY + net_miniupnpd_SET_FORCE= PF_ENABLE_FILTER_RULES IPV6 UPNP_IGDV2 CHECK_PORTINUSE security_openssl_SET_FORCE= PADLOCK