A Srapsware is a well-known brand for more than 14 years, we cover all elements of the computing industry that can fill your hunger for the latest technology of today.

Follow Us

OpenLiteSpeed configure with monit to monitor

OpenLiteSpeed configure with monit to monitor

To monitor OpenLiteSpeed with monit on Ubuntu Server, create file

vi /etc/monit/conf-enabled/openlitespeed

Add following content

check process OpenLiteSpeed with pidfile /tmp/lshttpd/lshttpd.pid
start program = "/usr/bin/systemctl start lshttpd"
stop program = "/usr/bin/systemctl stop lshttpd"

Reload monit with

monit reload

Now monit will monitor OpenLiteSpeed, restart if required. You can check status with

monit status

If you want to monitor if web server is responding to request, you can use

check process OpenLiteSpeed with pidfile /tmp/lshttpd/lshttpd.pid
start program = "/usr/bin/systemctl start lshttpd"
stop program = "/usr/bin/systemctl stop lshttpd"
if failed host localhost port 80 protocol http then restart

Shiv Singh
Fullstack Nomad Programmer, Ready to explore new places all over the world.
#programmer #gammer #traveller

You Might Also Like