Could be a file/directory permission-ownership mismatch, especially if you transferred in the WP files using root.
Read articles such as this: Linux File Permissions and Ownership Explained with Examples first to understand more.
cd into home, and then ls -l, and make a note of the username and groupname for ‘mydomain’.
Then cd into mydomain, and then ls -l, and make a note of the username and groupname of public_html. The username should be the same as that for home, but the group name should be ‘nobody’. This is where the 404 occurs if not ‘nobody’ I think.
Then cd into public_html, and then ls -l, and all the file users and groups should be the username and groupname set for home.
Then exit and report back with what you find.