Answer the question
In order to leave comments, you need to log in
How to auto-restart Apache in the presence of 502nd and 504th errors?
How to auto-restart Apache in the presence of 502nd and 504th errors?
When an error 502 pops up on the site, 504 to give the command to restart Apache.
I've looked all over the internet and can't find it. Axis FreeBSD
PS if apache completely dies, then there is another script that will start it.
Answer the question
In order to leave comments, you need to log in
Make a bash script with a curl request to the site. Get the header, parse the response code, and based on this, either restart or do nothing. Script in cron once per minute.
bash which reads the error log.
as soon as it finds traces of 502 or 504 errors there, Apache restarts.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question