Passwd & htaccess for lighttpd

Status
Not open for further replies.

pi0tr3k

Active Member
3,055
2009
768
10
I need to secure my adminCP, and I'm using Lighttpd. Can anyone show/write a simple htaccess file? I've been looking around, but meh, there went always something wrong :(
 
9 comments
Jay, I followed the steps from that site and it's not working!!!!
I created .htaccess with this
AuthUserFile /home/.../.../.../.passwd
AuthGroupFile /dev/null
AuthName EnterPassword
AuthType Basic
Require valid-user

When accessing my ACP I got that pop up window to enter pass & user, but after TYPING it, nothing happens, and the pop up window pops up again, and asks for user & pass..
 
edit
/etc/lighttpd/lighttpd.conf

and make sure server.modules += ( "mod_auth" ) is loaded.

and add this to directives
Code:
auth.debug = 2
auth.backend = "plain"
auth.backend.plain.userfile = "/home/desiboy/.lighttpdpassword"
and append this
Code:
auth.require = ( "/path_to_protect/" =>
(
"method" => "basic",
"realm" => "Password protected area",
"require" => "user=user"
)
)
create password file
nano /home/desiboy/.lighttpdpassword

and put desired user name and password
usrer:mypassword

and make sure that the .lighttpdpassword is readable by lighttpd

and restart lighty ,the directory will be protected..

edit according to your needs ;)

HTH
 
Status
Not open for further replies.
Back
Top