• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Please beaware of a breaking change in the REST API on the next Plesk release (18.0.62).
    Starting from Plesk Obsidian 18.0.62, requests to REST API containing the Content-Type header with a media-type directive other than “application/json” will result in the HTTP “415 Unsupported Media Type” client error response code. Read more here

Question Two domains - same root folder

TELLO0815

New Pleskian
Server operating system version
Ubuntu 18.04.6 LTS
Plesk version and microupdate number
Plesk Obsidian 18.0.45
Hi all,

i have one domain domain.com with ssl, email, and on...
Now I want to add second domain domain.net with ssl, email, and on... but to the same folder like first domain domain.com

Because I separate them in Symfony.
How can I do this in Plesk?

THX
 
There are two ways of doing this:
a) Upon domain creation you can set the same document root directory that your existing domain is using. If the domain has already been created, you can use the webhosting settings to change the document root to that folder.
b) You do not create the domain as webhosting, but with the "Add Alias" button and choose the existing domain as the master domain for the alias.
 
If the domain has already been created, you can use the webhosting settings to change the document root to that folder.
Thank you Peter. The Domain is already there. But how can I set the domain to the folder. The path in "Hosting and DNS" starts with the root of the domain folder?
 
The path starts with the root of the subscription, e.g. / would be the base directory of the subscription, /httpdocs is the typical document root of the master domain of that subscription, /somedomain.xx would be a typical document root for an add-on domain of that subscription. You can see the path of the master domain when you look into its settings. Simply set the add-on domain to the same path.
 
I don't get how to change a domain what's already there. Path...

I have domain_01.com and domain_02.com
They have their own webspace.
/var/www/vhosts/domain_01.com/httpdocs
/var/www/vhosts/domain_02.com/httpdocs

If I create new domain and say use webspace from domain_01.com it works.
But if I change the existing domain_02.com I stuck in the / root of the domain_02.com webspace... eg (/var/www/vhosts/domain_02.com/httpdocs)
 
Sorry for the confusion. You did not mention that your domains belong to different users. I thought that you want to add a domain, not a separate webspace.

The domains must reside in the same web space. It is not possible to form an alias with domains that reside in different webspaces. The reason for that is that each webspace (=subscription) is owned by a separate user. Site isolation keeps the areas that different users are allowed to view apart.
 
If it is an add-on domain, you can also "move" a domain from one subscription into another. Moving starts at the source. You need to be logged in as "admin" to be able to move a domain.
1667025910646.png

You can only move add-on domains, not the master domain of a subscription. So in case the domain you want to become an alias or to use the same root as the other is a master domain of another subscription, you cannot move it, you will indeed have to remove it and add it to the target subscription.
 
Back
Top