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.

link|improve this question
1  
Please post the entire content of auth.require section? – quanta Sep 7 '11 at 13:28
feedback

migrated from webmasters.stackexchange.com Sep 7 '11 at 13:04

This question came from our site for pro webmasters.

1 Answer

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"
    ))
}
link|improve this answer
feedback

Your Answer

 
or
required, but never shown