Add an extra check for a manual config change that breaks the index

This commit is contained in:
Jamie Cameron
2026-01-04 13:35:24 -08:00
parent 94c0826499
commit b1fe988f57
2 changed files with 9 additions and 0 deletions

View File

@@ -161,6 +161,7 @@ manual_efile=Invalid Apache config file
manual_etest=Configuration file error detected : $1 manual_etest=Configuration file error detected : $1
manual_editfile=Edit config file: manual_editfile=Edit config file:
manual_switch=Edit manual_switch=Edit
manual_evirt=Virtual host could not be found after manual changes - maybe the ServerName was changed?
dir_title=Per-Directory Options dir_title=Per-Directory Options
dir_proxyall=All proxy requests dir_proxyall=All proxy requests

View File

@@ -73,6 +73,14 @@ if ($config{'test_manual'}) {
&error(&text('manual_etest', &error(&text('manual_etest',
"<pre>".&html_escape($err)."</pre>")); "<pre>".&html_escape($err)."</pre>"));
} }
if (defined($in{'virt'}) && !defined($in{'idx'})) {
undef(@get_config_cache);
($conf, $v) = &get_virtual_config($in{'virt'});
if (!$v) {
&copy_source_dest($temp, $file);
&error($text{'manual_evirt'});
}
}
} }
unlink($temp); unlink($temp);
&unlock_file($file); &unlock_file($file);