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.
It is possible but requires an unofficial repo from Snapcraft as Amazon Linux 2 (AL2) does not have Selinux. I never saw a comprehensive doc of instructions but have notes on how to do it as I went through the process. I thought I might need to for someone to get certbot 1.12 for the "short chain" selection but I never saw it come up.
Amazon Linux 2022 (AL2022) is the successor to AL2 and has Selinux so hopefully certbot snap will install cleanly. AL2022 is still in preview.