Just to let you know... when I use virtualmin create-domain on the command line, the public_html folder does not get created with the correct permissions or owner all the time... twice it had two different results..
First time, the group was set to nobody, so I had permission denied for the new website, and second there was no owner assigned to it, and the group was an ID rather than a name.
Both times I manually chown and chgrp but think it may be an issue to investigate.
Oh, one thing, the "virtualmin create-domain" command was called via a SSH connection from another server in a bash script... that ssh login would have been root, then it would have called the "virtualmin create-domain". Dont know if its related.