A
A
ArrayPop2019-08-15 15:03:16
Nginx
ArrayPop, 2019-08-15 15:03:16

nginx won't start after updating ssl certificate What to do?

On ubuntu-18.04 + nginx + php-fpm a site is running that has a certificate from letsencrypt installed. It is updated every month by cron with certbot renew --pre-hook stops nginx and --post-hook starts nginx at midnight. But for some reason nginx stops but does not start. The status is simply "device cannot be restarted". At the same time, everything works when manually started, also if I set every minute cron, it also works, but then it will turn off anyway and the reason for the failure will not be clear. I also tried a bash script in which, using the usual systemctl start nginx console command, after the certificate renewal is completed ,nginx still stops at some time by itself and does not start.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Viktor Taran, 2019-08-15
@shambler81

1 why once a month is possible and more often.
2. why stop reload is enough

K
ky0, 2019-08-15
@ky0

Try without hooks, just through cron:
Well, the logs, of course, would help.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question