I used Virtualmin’s backup from a CentOS 6 system which used /var/www/user/ as the home directory and restored it to a CentOS7 system which uses /home/user/ as the home directory. Both use public_html as the web directory. I have done this before without any issue beyond Webalizer getting lost.
Virtualmin properly set the new user directory on the ContOS7 system. Apache conf was corrected to /home from /var/www. Yet, LetsEncrypt says:
“However, the Let’s Encrypt service requires that your ownership of the certificate domain be validated by checking that this system hosts the website for the domain. This is done by placing a small temporary file under the website’s document directory /var/www/user/public_html.” which is the old directory from the old server for this moved virtualhost.
So, I grepped for that path and luckily did it on /etc/webmin and up popped virtual-server/domains/###############. I edited that file correcting the path. Fought with some certbot instances that were running and after all was cleaned up, LetsEncrypt did update the cert.
I was surprised that Virtualmin made the path corrections in Apache, but did not correct the home path in this config file.