• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • The ImunifyAV extension is now deprecated and no longer available for installation.
    Existing ImunifyAV installations will continue operating for three months, and after that will automatically be replaced with the new Imunify extension. We recommend that you manually replace any existing ImunifyAV installations with Imunify at your earliest convenience.

Resolved Nextcloud accessible through two subdomains

TheColin21

New Pleskian
Hi,
I have a Plesk Installation on Ubuntu 20 with MariaDB, Apache and Nginx. There are several domains running on this server, which each have some subdomains.
Of of those domains hast an up-to-date Nextcloud-installation on it, in the subdomain cloud.example1.com.
I have a second domain, example2.com and I would like to make the same Nextcloud accessible through cloud.example2.com - not just through a redirect. I want the domain cloud.example2.com access the same website, database and so on, as cloud.example1.com.

Is this even doable? And if so, how?

Best regards
Colin P
 
You could create cloud.example1.com as a separate domain (not subdomain) and create alias cloud.example2.com for this domain.
 
No, if you do not check the 301 redirect checkbox on the Alias, it's a real alias for the main domain, there is no redirect involved. The domain simply opens the same document root path like the parent.
 
Thanks a lot. Is there an "easy" way of moving cloud.example1.com (subdomain) to a "full" domain? I can imagine that quite a lot could go wrong trying to copy it back and forth.
 
No, it is not possible to upgrade a subdomain to a full domain. You need to backup your data, remove the domain and add it again with the "add domain" button, the restore the backup. The database can be retained, but the files must be moved out of the path. However, if you retain the name of the path, moving the backup into the same path after re-adding the domain will save you all other efforts like setting new configuration variables in the Nextcloud config file. It's not a difficult process, just make sure you have saved all files to a separate, safe location before you remove the domain.
 
Does that mean, that I can save the contents of " /var/www/vhosts/system/cloud.example1.com" and by restoring it afterwards I get the complete configuration of my domain again?
 
No, I meant the content. That will normally reside in /var/www/vhosts/<main domain>/<subdomain>. You move <subdomain> to anything like <temporary>, then you remove the current subdomain configuration, re-create it with the "add domain" function an give it the same <subdomain> document root as the subdomain had before. Then you delete the new, empty <subdomain> folder and move <temporary> back to <subdomain>. This will retain all Nextcloud data and configuration.

The /var/www/vhosts/system/<domain> directories are for web server and some other configuration files only. These are auto-attended and should not be edited manually.
 
You're completely right, this will keep all Nextcloud data and configuration. What about my Apache/Nginx/PHP configuration though? That's quite a lot too.
 
Back
Top