R
R
Roman2019-03-13 14:43:35
Apache HTTP Server
Roman, 2019-03-13 14:43:35

How can I monitor the state of Apache2 in Ubuntu Server 18.04 and restart if necessary?

Hello.
After installing certificates with Certbot, Apache2 periodically crashes.
The reason is still unknown, and for the time of clarification, I decided to make a crutch - monitor the state of Apache every minute, and if it lies, do something like
service apache2 start
manually, it works :)
how can this be done?
What is cron - I know. But I don't know how to write bash scripts.
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roman, 2019-03-13
@procode

In general, I found the answer:
blog.sedicomm.com/2018/03/17/kak-ustanovit-i-nastr...
it's called - monit let's
see what happens next))

A
artem78, 2019-03-13
@artem78

daemontools
https://losst.ru/avtomaticheskij-perezapusk-servis...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question