I with this configuration does not work
***************************
I expose my files and install:
***************************
install:
opkg install lighttpd-mod-auth
opkg install lighttpd-mod-authn_file
**********************
my file liggttpd.conf:
**********************
server.modules = (
)
server.document-root = "/opt/share/www"
server.upload-dirs = ( "/opt/tmp" )
server.errorlog = "/opt/var/log/lighttpd/error.log"
server.pid-file = "/opt/var/run/lighttpd.pid"
#server.username = "http"
#server.groupname = "www-data"
index-file.names = ( "index.php", "index.html",
"index.htm", "default.htm",
"index.lighttpd.html" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
### Options that are useful but not always necessary:
#server.chroot = "/"
server.port = 81
#server.bind = "localhost"
#server.tag = "lighttpd"
#server.errorlog-use-syslog = "enable"
#server.network-backend = "write"
### Use IPv6 if available
#include_shell "/opt/share/lighttpd/use-ipv6.pl"
#dir-listing.encoding = "utf-8"
#server.dir-listing = "enable"
include "/opt/etc/lighttpd/mime.conf"
include_shell "cat /opt/etc/lighttpd/conf.d/*.conf"
server.modules += ( "mod_auth" )
auth.backend = "plain"
auth.backend.plain.userfile = "/opt/etc/lighttpd/passwd"
auth.require = (
"" =>
( "method" => "basic",
"realm" => "restricted area",
"require" => "valid-user"
)
)
********************************************
my file 20-authn_file.conf in the folder conf.d
********************************************
server.modules += ( "mod_authn_file" )
********************************************
my file 20-auth.conf in the folder conf.d
********************************************
#######################################################################
##
## Authentication Module
## -----------------------
##
## See
http://redmine.lighttpd.net/projects/lighttpd/wiki/docs_modauth
## for more info.
##
#
#auth.backend = "plain"
#auth.backend.plain.userfile = "/etc/lighttpd/lighttpd.user"
#auth.backend.plain.groupfile = "/etc/lighttpd/lighttpd.group"
#auth.backend.ldap.hostname = "localhost"
#auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
#auth.backend.ldap.filter = "(uid=$)"
#auth.require = ( "" =>
# (
# "method" => "basic",
# "realm" => "restricted area",
# "require" => "valid-user"
# ),
# )
#
##
#######################################################################