在/etc/nagios3下执行“htpasswd -c htpasswd.users nagiosadmin”以生成nagios的用户文件
在/etc/liggttpd/conf-enabled下新建一个nagios.conf文件,向内写入web配置文件,如图
![lighttpd下安装nagios_休闲](https://s2.51cto.com/attachment/200909/200909281254103602328.jpg?x-oss-process=image/resize,m_fixed,w_1184)
"/nagios3/stylesheets" => "/etc/nagios3/stylesheets",
"/nagios3" => "/usr/share/nagios3/htdocs"
)
$HTTP["url"] =~ "^/cgi-bin" {
cgi.assign = ( "" => "" )
}
auth.backend = "htpasswd"
auth.backend.htpasswd.userfile = "/etc/nagios3/htpasswd.users"
auth.require = ( "" => (
"method" => "basic",
"realm" => "nagios3",
"require" => "valid-user"
)
)
}
}