Replace Domain, needed to change existing certificate

I need to replace my certificate,
My existing certificate is newhatchin.ossphinc.com but i need to replace it to a new domain.

I tried sudo certbot --apache -d newdomain.com but Unable to install the certificate

Please help,
What to i need to run to replace my existing certificate or configuration to a new domain.

Thank you so much

1 Like

Getting a certificate and using a certificate a two separate things.
Sometimes the using part can be "assisted" with simple scripting.
Certbot is very good at getting certs.
Apache is very bad at requiring coding compliance.
Certbot doesn't always understand what apache is willing to run.
So, ultimately the real burden in using certs lies on the server admin.

The most likely way that would fail is if that new domain is not clearly defined in your apache config.

Let's have a look at:
certbot certificates
apachectl -S

1 Like

The certificate in use was REVOKED.
Was that something you did? (if so, why?)
See: https://www.ssllabs.com/ssltest/analyze.html?d=newhatchin.ossphinc.com

I was going to replace the domain, Is there a way to re-create a new one?
Thank you so much for your time

Please don’t REVOKE certs when you are no longer going to use them.
You can just DELETE them instead.
Using:
certbot delete --cert-name newhatchin.ossphinc.com

You may also have to manually remove it from wherever it may have been used (or delete the entire file using it [if no longer needed]).
See file: /etc/apache/sites-enabled/000-default-le-ssl.conf

Thanks,my mistake. Can I run sudo certbot --apache again? so It can generate a new certificate for the New Domain?

Yes, each domain/cert is basically unrelated to any other domain/cert.
[except for rate limits - but you should be fine]

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.