SSL for trusted domain

Hi,

I’ve installed Nextcloud 11 a few weeks ago and everything is running fine over https://cloud.mydomain.com
I have another subdomain that points to this IP and that works fine on http://cloud.domain2.com when it exists as a DNS only domain but not when I create a hosting space for it to provide an SSL certificate for it. I believe the answer to my question could come in two forms, one which may be an answer for elsewhere.

  1. If I create hosting for it, what’s the correct way to point it to the first installation? I’ve tried updating the document root, which works, but when I go to create a public share, the little wheel just spins indefinitely and you can’t see the public url to share (the main issue for this domain). If you then visit the http version of this site, it has been shared and you see the http share url.

  2. (Probably for elsewhere) How do I set up SSL for this second domain if it doesn’t have hosting?

I’m happy for either scenario to happen, and this second domain is just for vanity reasons. I could of course reverse everything but then the situation just gets reversed as you’d expect.

My setup is
Centos 7.3
VestaCP as a hosting panel (Which is providing LetsEncrypt)
I’m running PHP 7.1, Apache 2.4.6 with nginx reverse proxying
I also have webmin installed if that can assist in any way

Hoping someone can assist or point me in the right direction.
Many thanks
Iain

I don’t get this, your don’t need to create a hosting space. Just set up the apache2 vhost correctly and your are good to go. The certs .pem/.crt and key they don’t require hosting space to be setup. Just a vhost conf file.

When using the default apache (port 80) conf file, you need no configuration (since all the traffic hitting that ip will see the site).
But if you set up SSL (port 443) you need to create a vhost configuration file to that specify the domain you are trying to reach, the cert, key and ssl chain. In order to make the connection secure.

Hope it helps. Let me know if you find some issue in the way.