如何检测和重启Apache和Lighttpd
作者: 出处: 更新时间:2007-10-25 责任编辑:
 
 

a) Run it as daemon and check the services (such as web, mysql, sshd) at 2-minute

intervals.

set daemon 120

b) Set syslog logging with the ‘daemon’ facility:

set logfile syslog facility log_daemon

c) Set mail server name to send email alert

set mailserver mail.cyberciti.biz

Set email format such as from email

set mail-format { from: alert@nixcraft.in

subject: $SERVICE $EVENT at $DATE

message: Monit $ACTION $SERVICE at $DATE on $HOST: $DESCRIPTION.

}

d) Now most important part, restart lighttpd or apache web server if failed or killed by Linux kernel due to any causes:

check process lighttpd with pidfile /var/run/lighttpd.pid

group lighttpd

start program = "/etc/init.d/lighttpd start"

stop program = "/etc/init.d/lighttpd stop"

if failed host 75.126.43.232 port 80

protocol http then restart

if 5 restarts within 5 cycles then timeout


Where,


check process lighttpd with pidfile /var/run/lighttpd.pid : You are specifying lighttpd pid file and daemon name
group lighttpd : Specify group name, which is allowed or used to start/restart lighttpd
start program = “/etc/init.d/lighttpd start” : Command to start lighttpd server
stop program = “/etc/init.d/lighttpd stop”

 
     
 
 
后退<<上一页 继续>>下一页
[上一页][第1页][第2页][第3页][第4页][第5页][第6页][下一页]
 
内容导航  
第1页如何检测和重启Apache.. 第2页如何检测和重启Apache..
第3页如何检测和重启Apache.. 第4页如何检测和重启Apache..
第5页如何检测和重启Apache.. 第6页lighttpd
上一篇 : lighttpd 安装过程 下一篇Lighttpd的安装配置(web..
 
  您要为所发表的言论的后果负责,请各位遵纪守法并注意文明用语
标题:  

[ 关于本站 ] [ 广告服务 ] [ 商务合作 ] [ 联系我们 ] [ 合作伙伴 ] [ 法律顾问 ] [ 网站地图 ]
千橡公司 京ICP证041489号 Copyright (c) 1997-2007 All Right Reserved.