是否可以使用auth.require
类似下面的主机条目指令?
$HTTP["host"] =~ "db\.example\.com$" {
server.document-root = "/usr/share/phpmyadmin"
server.errorlog = "/var/log/lighttpd/db.example.com/error.log"
accesslog.filename = "/var/log/lighttpd/db.example.com/access.log"
server.error-handler-404 = "/e404.php"
}
每次我尝试使用auth.require
其中一个语句时,都会得到一个无效的配置文件。
答案1
抱歉。毕竟是打字错误。以下内容运行良好:
$HTTP["host"] =~ "db\.example\.com$" {
server.document-root = "/usr/share/phpmyadmin"
server.errorlog = "/var/log/lighttpd/db.example.com/error.log"
accesslog.filename = "/var/log/lighttpd/db.example.com/access.log"
server.error-handler-404 = "/e404.php"
auth.require = ( "" => (
"method" => "digest",
"realm" => "dbuser",
"require" => "valid-user"
))
}