Skip to content

Adding cert to multiple servers

serverco edited this page Jun 16, 2016 · 2 revisions

Whilst the getssl script can obtain a certificate for multiple domains, which can be spread over multiple servers, by default it only uploads the certificates to the one location you specify.

To overcome this, simply create a bash script which does the following;

loop over all servers 
- copy certificates to server x
- restart services on server x
- pause a couple of seconds 
- check cert is correctly installed on server x
end of loop
return an error if there were any problems. 

make sure this script has executable permissions, and then call it in the RELOAD_CMD in the config for that certificate.

Once a certificate has been obtained, this will then be run - and automatically copy the certificate to all the domains / servers you require and restart the services required.

Clone this wiki locally