icing / mod_md

Let's Encrypt (ACME) in Apache httpd
https://icing.github.io/mod_md/
Apache License 2.0
334 stars 28 forks source link

how to move managed domain to another server #297

Closed mjpvandenberg closed 2 years ago

mjpvandenberg commented 2 years ago

Suppose I'm hosting mydomain.com on server A. I've deployed a new version of my web application on server B, and now I want to point mydomain.com to server B.

As far as I know, this leaves me in a bind, if I want to use mod_md on server B. I need the SSL certificate to be installed on server B before I switch traffic to server B, but in order to install the SSL certificate mod_md needs mydomain.com to already point to server B.

What's the recommended way to deal with this scenario?

icing commented 2 years ago

If I understand your scenario correctly, you can fully setup server B before changing the 'A' record in DNS. As to certificates, you may want to copy the MDStoreDir from A to B (at least the domains/mydomain.com directory.

Certificates are not bound to IP addresses, so simply copying them to B will work there. The DNS mapping needs to be in place whenever B has to renew those certs. But it will continue to use the "old" certs until it is able to get new ones.

mjpvandenberg commented 2 years ago

Thanks, I will try this out!