I’m about to switch from one server to another with a newer Ubuntu. I would like to know how to develop in preproduction a site on a domain with for NDD for example : preprod.mydomain.com then, when all webpages are ok, rename the NDD to somethings like : www.readydomain.com
Is it possible to make more than with command line, or via the HestiaCP GUI ?
create the final web-domain already even if it’s not connected and add the preprod subdomain as alias. usually the quickest way. as mentioned in the other thread you can even use a local host entry then to test with the final planned domain…
as the web domain is part of the path and a center piece for how pages are deployed there is no way to just switch it.
of course you can create the final one after your staging as separate web-domain and sync your data from one folder to another… though depending on the framework you are using, you want to be careful with hardcoded paths etc. (would consider that bad practise anyway).
Thank you flazo for your quick answer. And for the SSL certificat, can I create it before the production launch?
of course you’ll only get a domain validated LE cert if the main domain points to the correct IP already, so if it’s somewhere else while staging the new stuff the simple click in the panel won’t work.
but you can always use command line to get some letsencrypt stuff either only for the preprod domain or use dns-validation instead
also with services like gogetssl you can get 90 day free certs as well and put them in there manually.
lot’s of options - hestia isn’t neccessarily CI optimised though
During the development phase of a site/domain that I couldn’t get a Let’s Encrypt certificate for, I used the certificate of another site. I just copied the contents of the SSL Certificate, SSL Key, SSL Certificate Authority / Intermediate fields of the other site, to the dev site and checked the Enable SSL for this domain.
Of course the browser issued the warning that the certificate was for a different domain, but upon accepting that warning, I was able to visit the dev site/domain using https. Please bear in mind that this is a quick and (very) dirty approach, because we are exposing the private key of another site to a different one (in Hestia GUI). Only use this approach if you own both sites/domains.
Of course @falzo proposal to get a certificate from gogetssl for a domain that can’t be auto-validated, is way better.