lighttpd设置虚拟主机、虚拟目录IP访问限制
lighttpd设置虚拟主机、虚拟目录IP访问限制
虚拟主机:
$HTTP["host"] == "admin.test.cn" {
server.document-root="/home/admin/web"
$HTTP["remoteip"] != "172.26.0.0/16" {
url.access-deny = ( "" )
}
}
虚拟目录:
$HTTP["url"] =~ "^/directory-to-protect/" {
$HTTP["remoteip"] != "172.26.0.0/16" {
url.access-deny = ( "" )
}
}