Submitted by expressitech on Sun, 02/09/2020 - 08:26 Pro Licensee
CentOS Linux release 7.7.1908 wbm-virtual-server-6.08.gpl-1.noarch
Restoring 100+ domains with many alias domains from a directory corrupts Apache httpd.conf The problem is in /usr/libexec/webmin/virtual-server/feature-web.pl restore_web function's alias restoring part.
The fix is clearing the apache config cache.
1548 &flush_file_lines($pvirt->{'file'}); 1549 + undef(@apache::get_config_cache); 1550 &$second_print($text{'setup_done'});
Please review it and include it in a next release.
Thank you.
Regards, Matyas
Status:
Active
Comments
Hi,
I will pass it to Jamie for review.
Thanks for the feedback.
Submitted by JamieCameron on Sun, 02/09/2020 - 11:09 Comment #2
That shouldn't actually be needed, since the cache is updated by apache::save_directive .
What kind of corruption happens exactly?
Submitted by expressitech on Fri, 03/06/2020 - 06:24 Pro Licensee Comment #3
Randomly missing directives, but only after about 100 proper VirtualHosts restored to httpd.conf. Things like ServerName missing, closing tag missing. I could reproduce it on two servers (Cloudmin cluster with VirtualminSettings/ Replicate Virtual Servers). To simplify things I saved the backups to a directory and when restoring same thing happened as from Cloudmin web interface.
With the cache clear in the alias restore section never happened since. But we can't update Virtualmin without losing the fix.
Thank you.
Submitted by JamieCameron on Sat, 03/07/2020 - 12:11 Comment #4
Try applying this patch instead : https://github.com/virtualmin/virtualmin-gpl/commit/1134547323e250be2778...