This repository has been archived on 2019-03-24. You can view files and clone it, but cannot push or open issues/pull-requests.
lighttpd/lighttpd.conf

53 lines
1.4 KiB
Plaintext

server.modules = (
"mod_alias",
"mod_webdav",
"mod_auth",
"mod_authn_ldap",
)
include "mime-types.conf"
server.username = "lighttpd"
server.groupname = "lighttpd"
server.document-root = "/srv/www"
server.indexfiles = ("index.html", "index.htm")
server.follow-symlink = "enable"
alias.url = ("/directory-listing-assets/" => "/etc/lighttpd/assets/")
dir-listing.activate = "enable"
dir-listing.encoding = "utf-8"
dir-listing.external-css = "/directory-listing-assets/listing.css"
dir-listing.external-js = "/directory-listing-assets/listing.js"
webdav.activate = "enable"
webdav.is-readonly = "enable"
auth.backend = "ldap"
auth.backend.ldap.hostname = "@@LDAP_SERVER@@"
auth.backend.ldap.base-dn = "@@LDAP_BASE@@"
auth.backend.ldap.filter = "(uid=$)"
auth.backend.ldap.starttls = "enable"
auth.backend.ldap.bind-dn = "@@LDAP_USER@@"
auth.backend.ldap.bind-pw = "@@LDAP_PASSWORD@@"
#auth.require = ( "/" =>
# (
# "method" => "basic",
# "realm" => "media",
# "require" => "valid-user"
# )
# )
$HTTP["url"] !~ "^/directory-listing-assets/" {
auth.require = ( "" =>
(
"method" => "basic",
"realm" => "media",
"require" => "valid-user"
)
)
}