4 ms·
Good old "cert replaced but apache/nginx failed to reload" has bitten me more than once...
by kl4m 6y ago
Good old "cert replaced but apache/nginx failed to reload" has bitten me more than once...
- Sebb767 6y agoMe too! Especially with the short expiration times of LetsEncrypt. But I really don't want to put `nginx -s reload` in the Cron, in case I'm tinkering with the configs and they're suddenly live (which only really happens at staging or at home of course, but still).
- amaccuish 6y agoCertbot has deploy hooks which is where I'd put the nginx reload statement. The hooks are run automatically when a new certificate is issued.
- Sebb767 6y agoOh, that's a great idea! Thanks :)
- emilburzo 6y agoYou can use `nginx -t && nginx -s reload` for that. It will first check the configs/paths, and only then, if successful, signal nginx to reload.
- Sebb767 6y agoThat's what I usually do. My problem is that I might be adding a location and nginx reloads between that and adding access restrictions (i.e. because I took a break to google).