Nginx needed restart, reload wasn't working

Has anyone seen a situation where reloading nginx configuration stops working, and restarting nginx fixes it?

The reason I ask is that certbot renewal using the nginx authenticator suddenly stopped working. When debugging it I found that the temporary configuration made by certbot didn't go into effect.

I then found that my own, manual, configuration of nginx wouldn't reload either, even though the syntax check was fine and the nginx logs reported a reload.

After a systemctl restart nginx it all started working again and my certificates renewed.

I can find no obvious errors in the logs and this ubuntu-22.04 machine has been happily renewing certificates for several years without problems before this.

1 Like

Yes but not in your exact situation. I had made major changes to listening ports and needed a restart instead of reload. I now routinely restart after such changes just to be safe.

Googling around I found below thread which might be worth checking your nginx conf

3 Likes

Sounds like the problem is somewhere within nginx.
Have you updated to their latest version?

2 Likes

Iirc if nginx needs to bind a new previliged port it needs restart, because it already dropped root privilege so it can't bind it

3 Likes