Other than Monit, do you know how can auto start the lighttpd?

maybe some built-in function which I dont know...

(I use Lighttpd 1.4.22)

Thanks in advance.


There is a thread on the lighttpd forum that illustrates how this can be done.

Put the following in a file, make it executable and trigger it to run from cron. You will need to tweak it for your environment.

wget --tries=1 --timeout=5 -O /dev/null http://localhost:80/
if [ $? -ne 0 ]; then
  (killall -9 lighttpd; killall -9 gam_server; killall -9 php-cgi; 
/etc/init.d/lighttpd zap; /etc/init.d/lighttpd start)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy