Hi, I tried to setup a ssl-certificate on my schools LMS-Server. But certbot tells me that its unable to do that.
My domain is: schuefwsgt.dd-dns.de or specific schuefwsgt.dd-dns.de/moodle
I ran this command:
sudo apt-get install certbot python3-certbot-apache
sudo certbot --apache
It produced this output:
IMPORTANT NOTES:
Unable to install the certificate
Congratulations! Your certificate and chain have been saved at: …
My web server is (include version): apache2
The operating system my web server runs on: Ubuntu 18
I can login to a root shell on my machine.
I’m not using a control panel to manage my site.
The version of my client is certbot 0.31.0
okay, everything above apt-get install I haven't written down here beacuse I thought it would be obvious that I did. But of cause I ran
> sudo apt-get update
actually there was an upgrade but it was just the libgd. Doesn't matter I ran the command certbot --apache again and this time I got this:
You have an existing certificate that has exactly the same domains or certificate name you requested and isn't close to expiry.
(ref: /etc/letsencrypt/renewal/schuefwsgt.dd-dns.de.conf)
What would you like to do?
1: Attempt to reinstall this existing certificate
2: Renew & replace the cert (limit ~5 per 7 days)
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 1
Keeping the existing certificate
We were unable to find a vhost with a ServerName or Address of schuefwsgt.dd-dns.de.
Which virtual host would you like to choose?
Select the appropriate number [1-3] then [enter] (press 'c' to cancel): 1
The selected vhost would conflict with other HTTPS VirtualHosts within Apache. Please select another vhost or add ServerNames to your configuration.
VirtualHost not able to be selected.
IMPORTANT NOTES:
Unable to install the certificate
Congratulations! Your certificate and chain have been saved at:
grep: /etc/apache2/sites-enabled/moodle-le-ssl.conf: No such file or directory
/etc/apache2/sites-available/moodle-le-ssl.conf_alt:SSLCertificateFile /etc/letsencrypt/live/schuefwsgt.dd-dns.de/fullchain.pem
/etc/apache2/sites-available/moodle-le-ssl.conf_alt:SSLCertificateKeyFile /etc/letsencrypt/live/schuefwsgt.dd-dns.de/privkey.pem
You need to understand how /sites-enabled/ and /sites-available/ work.
The “available” are all the files that can be used.
The “enabled” are the ones that are in use.
BUT the enabled is not another copy of that file, it is merely a link to the original file (in the available folder).
So you can’t just rename files in the available folder when they are in use.
But none of them use the domain “schuefwsgt.dd-dns.de”.
If that is something you still need, then you will need a vhost config for it.
If you no longer need it then you can simply delete that cert with: certbot --delete {cert-name} certbot --delete schuefwsgt.dd-dns.de