Switch paid ssl back to letsencrypt in centminmod

just quick note for my future reference :

I use letsencrypt for handling ssl then upgrade it paid ssl . When paid ssl expire I need to switch back to letsencrypt while waiting for approval of paid ssl.

The steps are simple for this task

1. Call acme from crontab list job

“/root/.acme.sh”/acme.sh –cron –home “/root/.acme.sh”

this command will renew any expire certificate or you can use –force option to make it work right away.

2. Edit ssl conf content

centminmod make it easy to spot corresponding file .

Open nano /usr/local/nginx/conf/conf.d/domain.com.ssl.conf (change domain.com to domain or sub domain)

Then change content of this file :

/usr/local/nginx/conf/ssl/domain.com/domain.com.crt.key.conf

to these :

ssl_dhparam /usr/local/nginx/conf/ssl/domain.com/dhparam.pem;
ssl_certificate /usr/local/nginx/conf/ssl/domain.com/domain.com-acme.cer;
ssl_certificate_key /usr/local/nginx/conf/ssl/domain.com/domain.com-acme.key;
ssl_trusted_certificate /usr/local/nginx/conf/ssl/domain.com/domain.com-acme.cer;

save the file.

Restart nginx

nprestart

done. Mission accompished 🙂