Let's encrypt and nginx restart issue


#1

Hello there,

I am currently facing a strange issue regarding how let’s encrypt and nginx work together.
I have successfully installed the certificates on my website and everything works well at this moment.

However I decided to update some changes to my nginx.conf file and on my surprise, when I restarted nginx the changes were not applied. So I tried to look if there was another nginx config file being used and it seems that let’s encrypt keeps a backups/ folder with the old nginx.conf contents I had before making those changes. Looks like my nginx is serving that file instead of the one he should be (/usr/local/etc/nginx/nginx.conf => returned from the command “nginx -t”)

So the question is: Is there a way to remove the cache of let’s encrypt ?

Thanks,

Billy


#2

Are you running FreeBSD or Darwin? If so, it might explain why certbot uses /usr/local/etc/nginx/ as root directory of nginx. Those directories, depending on your *nix variant, are hardcoded in the nginx plugin:

I’m not sure about every aspect of the code however:

Luckily, you can override this server-root variable on the command line:

If you run certbot --help, it should confirm the erroneous server root as the default option listed under the server-root option.

By setting --server-root to the correct directory, it might prevent this from happening again.

You also might want to file a bug on github for the certbot team with as much information possible.


closed #3

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