I think that you may have created your sites using a control panel. I say that because many of them have more than one way to create a site, one of which appears to be exactly what you have. It is a confusing mish-mash of site and user sites where one site was created first and the others were created using the same username later. This in of itself is not wrong, but there are two options with this where one creates user sites under the parent site which I think is what happened here. I would not worry about the details of this just yet. I would suggest that you familiarize yourself with the control panel for the future.
The good news is that there is an answer!
While I cannot look into a crystal ball and know exactly what has happened and what your configuration looks like, I am pretty sure I can tell you what your configuration should look like.
In the directory
/etc/local/apache2/sites-available, you will find configuration files with file names something like
domainname.tld.conf. You will want to edit each of these. I suspect that there is overlap in the
Directory directives between your configuration files. You do not want overlap in this- not for what you have described.
You should see something like this:
AddHandler cgi-script .php
Options -Indexes +IncludesNOEXEC +FollowSymLinks
allow from all
There may be other directives and specifications. I would not worry about that. The ones I want you to pay attention to are
Directory. You will notice that they are the same in this case. This is exactly what you want. For each site configuration, you want your website to be in a unique directory. I suggest a format like you see above where
/home/site3.com/www, etc. are for each site. Of course you change the various site# files to what your domain names are.
You will have to use the
cp command to copy your site from one location to the next. You may have to use
chown to change ownership,
chgrp, to change group ownership, and
chmod to ensure that permissions are set correctly. If you are not sure how to do this, then I suggest using something like
man chown and reading the manual and being very careful not to destroy the old directory scheme and to create a new directory scheme to make sure you get it right. You may have to change any
/cgi-bin/ directory directive and directory permission and redeploy any permissions which are often different from the site. Make sure if you use
ls to list a directory, that you use
ls-al to make sure you can see any
.htaccess and other hidden files. Do this work carefully. It is easy to do, but even a seasoned *nix user can goof it up from time to time. But then again it is also easy to fix too so don't worry too much.
If you have any CMS, blog, or other application installed, you will need to research how to change the directory that it uses within the configuration. Often this is a simple change in a configuration file as well and perhaps some permission considerations.
Once you have created each directory and you are sure that the file permissions are correct, then change the configuration files. This is the last step except clean-up. If there is a problem, you can fix it quickly or drop back and punt- setting the site configuration file back to the old directory until you have fixed the problem. Only after you feel that your sites are running the way you want them too and you do not need the old directories anymore, then you can back them up for safe keeping and delete them from your hard drive.
I hope that I got it all okay. Let me know if you have any questions. I can update this answer for you or respond in the comments.