# apache2 monit-cn template check process apache2 with pidfile "/var/run/apache2.pid" start program = "/etc/init.d/apache2 start" stop program = "/etc/init.d/apache2 stop" if failed host 127.0.0.1 port 80 protocol http with timeout 15 seconds then restart if children > 250 then restart