Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

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)
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.