How to manage a certificate for a failover domain?

Hello,

first I ve have to mention that I read this thread (Seting up certificate on failover (backup) server) how to manage a certificate for a main and backup server, but it s closed. My szenario is similar, but a bit different.

Server 1 => stats1.domain.de
Server 2 => stats2.domain.de

Failover-Domain => stats.domain.de linked to Server1

When installing Server 1 + 2 I created the certificates stats1.domain.de and stats.domain.de on Server1, and stats2.domain.de on Server 2. My goal is when Server 1 crashes I just need to set the A-Record of the failover-domain stats.domain.de to Server 2 without changing anything.

In Apache Server 1
ServerName stats1.domain.de
ServerAlias stats.domain.de

In Apache Server 2
ServerName stats2.domain.de
ServerAlias stats.domain.de

In the moment I have to set the certificate in Apache Server 1 to the certificate for stats.domain.de and I copied it to Server 2. It would be cool to get the certificate of the failover-domain into stats1 and stats2. Is this possible? Or is there another solution?

Hi @ThomasB

check

Perhaps create a redirect

stats/.well-known/acme-challenge/ -> destination
stats1/.well-known/acme-challenge/ -> destination
stats2/.well-known/acme-challenge/ -> destination

destination may be a directory of these servers, may be a third domain (port 80 or 443).

Then you can use Certbot and webroot to create one certificate with three domain names.

So every server is able to work with every domain name.

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