Moved the SSL password option to the global settings level, to correspond with the way Apache expects it.
---- Changes since 1.410 ----
Added support for the funny ${APACHE_RUN_USER} and ${APACHE_PID_FILE} variables seen in apache2.conf on Ubuntu 8.04.
+---- Changes since 1.430 ----
+When a virtual host's base directory is changed, all <directory> blocks under it are updated too.
&save_directive("ServerName", $name ? [ $name ] : [ ],
$vconf->{'members'}, $conf);
- # write out file
+ # Update any <Directory> blocks under the old path
+ if ($in{'root'} ne $in{'old_root'}) {
+ @dirs = &find_directive_struct("Directory", $vmembers);
+ foreach $dir (@dirs) {
+ if ($dir->{'words'}->[0] eq $in{'old_root'}) {
+ # Same dir
+ $dir->{'value'} = $in{'root'};
+ }
+ elsif ($dir->{'words'}->[0] =~ /^\Q$in{'old_root'}\E(\/.*)$/) {
+ # Under the dir
+ $dir->{'value'} = $in{'root'}.$1;
+ }
+ else {
+ next;
+ }
+ &save_directive_struct($dir, $dir, $vconf, $vconf, 1);
+ }
+ }
+
+ # Write out file
&flush_file_lines();
&after_changing();
&unlock_file($vconf->{'file'});
else { $addr = $val; }
if ($addrs) {
+ # Multiple addresses and ports
print &ui_table_row($text{'vserv_addrs'},
&ui_textarea("addrs", join("\n", split(/\s+/, $addrs)),
4, 30));
&opt_input($root->{'words'}->[0], "root",
$text{'vserv_default'}, 50).
&file_chooser_button("root", 1, 1));
+ print &ui_hidden("old_root", $root->{'words'}->[0]);
# Server name
$name = &find_directive("ServerName", $v->{'members'});