I have a site hosted in domain1.com/mysite. I need to be able to point domain2.com to that site, but without doing any redirect (the url has to be the same). The "mysite" is a part of a very complex web app located in domain1.com so i can´t just copy or move it to domain2.com public_html folder.
Both domains are hosted in the same server. Making a symbolic link between the public_html folder of my domain2.com to point to domain1.com/mysite folder would make this possible. The problem is that the 2 cpanel accounts are separate and i can´t access from one to another.
Is there any option in cpanel where i can change the permissions to allow the owner of one domain to access other domain or at least make possible to give the same owner to both domains?
Note that my host is running suPHP and suExec.
WARNING: This answer makes lots of assumptions, such as the assumption that both your domain1.com and domain2.com accounts are hosted on the same server. This isn't necessarily a valid assumption, and even if it's true now it's conceivable that it could change in the future. Your hosting company may have opinions regarding the solution presented here, and in order to avoid unnecessary conflict you should probably take your question to them first before attempting any solution presented here.
If you have command line access to your hosting provide and you are able to change the permissions on your home directory, then the following might work, depending on how things are set up at your hosting provider:
Set execute permissions on your home directory:
Get the path to your home directory because you're going to need it:
Log into your domain2.com account.
Rename your existing public_html directory:
Create a symlink to the domain1.com public_html directory:
Make sure this worked. You should be able to get a list of files in public_html like this:
If this doesn't work, let me know what happens and we'll see if we can come up with another solution. Also, ask your hosting provider, because they may be able to take care of this for you in a more robust fashion.