Okay thanks. I appreciate your time and helpful assistance. I will try the clean up and see what happens.
Basically, you will ideally have a number of virtual host configurations in /etc/apache2/sites-available
. There should be a basic HTTP one and then Certbot should make an HTTPS version based on that with the same name and the additional of -le-ssl.conf
.
The HTTPS one will be pointing at certificate-related files within /etc/letsencrypt
.
If you edit the HTTP (not HTTPS) virtual host to refer to the production name instead of the staging name and then re-run Certbot, it should be possible to obtain a new certificate for the production name and hopefully a new version of the -le-ssl.conf
file pointing at a new set of certificate files in /etc/letsencrypt
. Depending on whether you rename the /etc/apache2/sites-available
file first, you might then be able to delete the staging-related file(s) in /etc/apache2/sites-available
and references to them in /etc/apache2/sites-enabled
, or else all of the files in /etc/apache2
might continue to have the same names but simply different contents.
Once there are no longer any files in /etc/apache2
that refer to your old certificate, you can delete it with ./certbot-auto delete
; you can see your current certificate locations and name coverage with ./certbot-auto certificates
.
Please feel free to ask here if any step of the process is confusing to you. You can see that the cloned-server use case is not one that we’ve automated particularly well!
Great. Thanks!
Will give it a shot and let you know how it works out. Then there will be some documentation.
Cheers.
Hi,
Letting you know what seem to work. I had to change the domain name (for production) in /etc/apache2/sites-available in 2 files.
- default.conf
- -le-ssl.conf (this one only where ServerName was listed)
Ran command and it completed and changed the domain name (production) for SSLCerttificateFile path in
-le-ssl.conf
Logged onto NextCloud with production name and have green Secure https://
Test in with SSL Checker. All good.
Thanks again for your help.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.