0

Is it possible to use auth.require directives with host entries like the one below?

$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"
}

Every time I try to use auth.require from within one of those statements I end up with an invalid config file.

1 Answers1

0

My apologies. It was a typo after all. The following is working well:

$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"
    ))
}
Morris
  • 1