Saturday, January 24, 2009

Setup Basic authentication on Lighttpd

Simply, I picked plain text file to save password, of course there are httpasswd and htdigest for the password saving.


auth.backend = “plain”
auth.backend.plain.userfile = “/home/pathsomething/lighttpd.user”

auth.backend = “plain”
auth.require = ( “/mysql/” =>
(
“method” => “digest”,
“realm” => “mysql”,
“require” => “valid-user”
)
)


The password file is just like this:


username:passwd
user2:pw2


Done, is it simple?
The reference:
http://trac.lighttpd.net/trac/wiki/Docs%3AModAuth

No comments:

Post a Comment