That mean point mydomain.com to this DIR webroot

You use the Addon Domains option in cPanel to point different domains at different folders within public_html

Also a few rewrite commands in the .htaccess file in the public_html folder can redirect the domain pointing to that folder inso a sub folder as well so that all your domains are a different folder in the public_html folder.

All the files you don’t want directly accessible can be in another folder outside of public_html but included in the path that all your domains search for includes - in separate sub-folders corresponding to the different domains.