Regenerating nginx config


#1

I successfully set up certbot and had working https to several of my sites \o/ …but I’m using Ansible to add nginx vhost files. Having made some changes to how my ansible plays are working the vhost files with letsencrypt config have been overwritten and thus have lost the config.

I don’t see any way to tell certbot to re-add the config to the vhost files specifically (and not regenerate new certs). It seems the only workaround would be deleting the certs or otherwise forcing a renewal.

Can anyone suggest a workaround? How do you deal with this issue?


#2

Hi,

Can you confirm if you still got those listen 443 vHosts?


#3

If you run the original command, e.g. “certbot --nginx -d example.com”, and the certificate isn’t close to expiring, it should offer to reinstall it. Passing “--keep” will make it do that without asking.


#4

@mnordhoff Thanks, that looks like just what I need! Now have them working again - and a way to regenerate config via ansible if required.


#5

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