so I have deleted my certificate with this method: sudo certbot delete
Now, my IP is out of reach, and I get the information:
AH00526: Syntax error on line 7 of /etc/httpd/conf/httpd-le-ssl.conf:
SSLCertificateFile: file '/etc/letsencrypt/live/olddomain.com/fullchain.pem'
does not exist or is empty
Well yes, that is what it should be.
I have deleted it.
But why is that a problem?
Maybe this? :
When installing l.e. via certbot,
I followed the instructions of aws:
There is said -
Prepare to instal, point 2:
Edit the main Apache configuration file, /etc/httpd/conf/httpd.conf . Locate the " Listen 80 " directive and add the following lines...
I had done as requested.
Now, that I have deleted the l.e. certificate, the old info (old domain) is still in there.
I have tried to change it to new IP for example,
still the site is out of reach.
What the heck`?
Also, when trying to reach it it automatically shows https in front of the ip adress
(although I had deleted the certificate, as said).
Why?
Nowhere in my script I have ever changed something to force ssl.
This is a pretty explicit error message. What don't you understand?
Apache is refusing to start because you're asking it to use a certificate that isn't there. You need to restore it from a backup or disable that virtualhost (or whole https server?)
(You can also edit that line to point to a self signed certificate and key pair)
can you please tell me, where I can find the openSSL certificate on my server?
I assume its somewhere in the etc folder, like letsencrypt?
Edit: got it.
And: with editing everything starting with SSLCertificateFile SSLCertificateKeyFile
you mean everything inside the httpd.conf file, right?
(/etc/httpd/conf)
If you follow the instructions @9peppe linked to, it will be wherever you put it.
It would specifically be in /etc/httpd/conf/httpd-le-ssl.conf. That's the config file that's causing your problems (as the error message is telling you), so that's the one you need to fix.
Note: certbot delete does not equate to "certbot uninstall and also delete this certificate".
certbot --apache (or --nginx) will obtain and install a certificate.
But there is no single "undo" to that (two-step) process.
You should uninstall it manually (first).
Then certbot can delete it for you.
Fickle details. -sha256 will probably work but doesn't look like is CA/B approved for P-256 certs. -sha384 should be. (But should self signed certificates follow CA/B standards? Only if you want to be very pitnicky)
I just want to say, that it would be a great thing,
if someone would write a comprehensive guide on how to correctly delete letsencrypt certificates
(or, what to do when you change your domain).
All I was able to find, was that command that has led me into this trouble.