Added the Sending Email page which controls how Webmin itself sends messages.
---- Changes since 1.550 ----
Added fields to the Index Page Options page to control the display of Webmin and module updates.
+Moved settings related to Webmin's built-in webserver to the new Web Server Options page.
}
&save_tempdirs(\%gconfig, \@tdirs);
-# Save stack trace option
-$gconfig{'error_stack'} = $in{'stack'};
-
-# Save showing of stderr
-$miniserv{'noshowstderr'} = !$in{'showstderr'};
-
# Save umask
if ($in{'umask_def'}) {
delete($gconfig{'umask'});
$miniserv{'precache'} = $in{'precache'};
}
-# Save password pass option
-$miniserv{'pass_password'} = $in{'pass'};
-
-# Save gzip option
-if ($in{'gzip'} == 1) {
- eval "use Compress::Zlib";
- $@ && &error(&text('advanced_egzip', '<tt>Compress::Zlib</tt>'));
- }
-$miniserv{'gzip'} = $in{'gzip'};
-
&lock_file($ENV{'MINISERV_CONFIG'});
&put_miniserv_config(\%miniserv);
&unlock_file($ENV{'MINISERV_CONFIG'});
--- /dev/null
+#!/usr/local/bin/perl
+# Save webserver options
+
+require './webmin-lib.pl';
+&ReadParse();
+&error_setup($text{'web_err'});
+&get_miniserv_config(\%miniserv);
+
+# Save expires
+if ($in{'expires_def'}) {
+ delete($miniserv{'expires'});
+ }
+else {
+ $in{'expires'} =~ /^\d+$/ ||
+ &error($text{'web_eexpires'});
+ $miniserv{'expires'} = $in{'expires'};
+ }
+
+# Save stack trace option
+$gconfig{'error_stack'} = $in{'stack'};
+
+# Save showing of stderr
+$miniserv{'noshowstderr'} = !$in{'showstderr'};
+
+if (!$miniserv{'session'}) {
+ # Save password pass option
+ $miniserv{'pass_password'} = $in{'pass'};
+ }
+
+# Save gzip option
+if ($in{'gzip'} == 1) {
+ eval "use Compress::Zlib";
+ $@ && &error(&text('advanced_egzip', '<tt>Compress::Zlib</tt>'));
+ }
+$miniserv{'gzip'} = $in{'gzip'};
+
+# Save global config
+&lock_file("$config_directory/config");
+&write_file("$config_directory/config", \%gconfig);
+&unlock_file("$config_directory/config");
+
+# Save miniserv config
+&lock_file($ENV{'MINISERV_CONFIG'});
+&put_miniserv_config(\%miniserv);
+&unlock_file($ENV{'MINISERV_CONFIG'});
+
+&show_restart_page();
+&webmin_log("web");
+
&ui_textbox("precache",
$mode == 2 ? $miniserv{'precache'} : "", 40)) ] ]));
-# Show call stack on error
-print &ui_table_row($text{'advanced_stack'},
- &ui_yesno_radio("stack", int($gconfig{'error_stack'})));
-
-# Show CGI errors
-print &ui_table_row($text{'advanced_showstderr'},
- &ui_yesno_radio("showstderr", int(!$miniserv{'noshowstderr'})));
-
-# Pass passwords to CGI programs
-print &ui_table_row($text{'advanced_pass'},
- &ui_yesno_radio("pass", int($miniserv{'pass_password'})));
-
# Umask for created files
print &ui_table_row($text{'advanced_umask'},
&ui_opt_textbox("umask", $gconfig{'umask'}, 5, $text{'default'}));
}
}
-# Gzip static files?
-print &ui_table_row($text{'advanced_gzip'},
- &ui_radio("gzip", $miniserv{'gzip'},
- [ [ '', $text{'advanced_gzipauto'} ],
- [ 0, $text{'advanced_gzip0'} ],
- [ 1, $text{'advanced_gzip1'} ] ]));
-
print &ui_table_end();
print &ui_form_end([ [ "save", $text{'save'} ] ]);
--- /dev/null
+#!/usr/local/bin/perl
+# Show the web serving options form
+
+require './webmin-lib.pl';
+&ui_print_header(undef, $text{'web_title'}, "");
+&get_miniserv_config(\%miniserv);
+
+print &ui_form_start("change_web.cgi", "post");
+print &ui_table_start($text{'web_header'}, undef, 2);
+
+# Default content expiry time
+print &ui_table_row($text{'web_expires'},
+ &ui_opt_textbox("expires", $miniserv{'expires'}, 10,
+ $text{'web_expiresdef'}, $text{'web_expiressecs'}));
+
+# Show call stack on error
+print &ui_table_row($text{'advanced_stack'},
+ &ui_yesno_radio("stack", int($gconfig{'error_stack'})));
+
+# Show CGI errors
+print &ui_table_row($text{'advanced_showstderr'},
+ &ui_yesno_radio("showstderr", int(!$miniserv{'noshowstderr'})));
+
+if (!$miniserv{'session'}) {
+ # Pass passwords to CGI programs
+ print &ui_table_row($text{'advanced_pass'},
+ &ui_yesno_radio("pass", int($miniserv{'pass_password'})));
+ }
+
+# Gzip static files?
+print &ui_table_row($text{'advanced_gzip'},
+ &ui_radio("gzip", $miniserv{'gzip'},
+ [ [ '', $text{'advanced_gzipauto'} ],
+ [ 0, $text{'advanced_gzip0'} ],
+ [ 1, $text{'advanced_gzip1'} ] ]));
+
+print &ui_table_end();
+print &ui_form_end([ [ "save", $text{'save'} ] ]);
+
+&ui_print_footer("", $text{'index_return'});
+
"edit_categories.cgi", "edit_descs.cgi", "edit_themes.cgi",
"edit_referers.cgi", "edit_anon.cgi", "edit_lock.cgi",
"edit_mobile.cgi", "edit_blocked.cgi", "edit_status.cgi",
- "edit_advanced.cgi", "edit_debug.cgi" );
+ "edit_advanced.cgi", "edit_debug.cgi", "edit_web.cgi", );
@wtitles = ( $text{'access_title'}, $text{'bind_title'},
$text{'log_title'}, $text{'proxy_title'},
$text{'ui_title'}, $text{'mods_title'},
$text{'anon_title'}, $text{'lock_title'},
$text{'mobile_title'}, $text{'blocked_title'},
$text{'status_title'}, $text{'advanced_title'},
- $text{'debug_title'}, );
+ $text{'debug_title'}, $text{'web_title'}, );
@wicons = ( "images/access.gif", "images/bind.gif", "images/log.gif",
"images/proxy.gif", "images/ui.gif", "images/mods.gif",
"images/os.gif", "images/lang.gif", "images/startpage.gif",
"images/descs.gif", "images/themes.gif", "images/referers.gif",
"images/anon.gif", "images/lock.gif", "images/mobile.gif",
"images/blocked.gif", "images/status.gif",
- "images/advanced.gif", "images/debug.gif" );
+ "images/advanced.gif", "images/debug.gif", "images/web.gif", );
if ($gconfig{'eazel'}) {
push(@wlinks, "edit_syslet.cgi");
push(@wtitles, $text{'syslet_title'});
log_referers=Changed trusted referrers
log_descs=Changed module titles
log_advanced=Changed advanced options
+log_web=Changed web server options
log_osdnclear=Cleared download cache
log_savekey=Uploaded existing SSL key
log_deletecache=Deleted $1 URLs from cache
advanced_sclass=IO class for scheduled jobs
advanced_sprio=IO priority for scheduled jobs
advanced_gzip=Gzip compress static files?
-advanced_gzipauto=Only pre-compressed .gz file exists
+advanced_gzipauto=Only if pre-compressed .gz file exists
advanced_gzip0=Never
-advanced_gzip1=Use pre-compressed file or compress dynamically
+advanced_gzip1=Use pre-compressed file and compress dynamically
advanced_egzip=Gzip compression cannot be enabled unless the $1 perl module is installed
syslog_errorlog=Webmin error log
sendmail_elogin=Missing SMTP server login
sendmail_efrom=Missing or incorrectly formatted from address
+web_title=Web Server Options
+web_header=Options for Webmin's built-in webserver
+web_expires=Client-side cache time for static files
+web_expiresdef=Webmin default (7 days)
+web_expiressecs=Time in seconds
+web_err=Failed to save web server options
+web_eexpires=Missing or non-numeric client size cache time
+
__norefs=1