I migrated a site from cPanel to Virtualmin and created a subserver under it.
I enabled DNS and apache website on the new subserver.
I uploaded files via FTP (using the main server's user account) into domain.com/domains/sub.domain.com and checked that permissions and ownership were set correctly on the files and directories (0750)
Thanks but I have an index.php file in the directory /home/domain.com/domains/sub.domain.com/public_html/
I also tried uploading a text file and accessing via sub.domain.com/test.txt.
and it worked. It’s not really what I wanted to have the subdomain as a subfolder of the main domain and it’s a bit of a hack, but it’s a workaround for the moment.