i would use an htpasswd protection for an folder of my website. I use lighttpd an i have write the following code into the lighttpd.conf

# Limit access to ispgen
auth.backend = "htpasswd"
auth.backend.htpasswd.userfile = "/etc/lighttpd/htpasswd/.htpasswd"
auth.require = ( "/var/www/florian-wirths.de/ispgen" =>
    (
    "method"  => "basic",
    "realm"   => "ISPGen",
    "require" => "valid-user"
    ),
)

But it works not for me. What i do wrong?

link|improve this question
feedback

1 Answer

up vote 1 down vote accepted

Provided you've created the .htpasswd file correctly, the only problem I see with your config segment is the auth.require path - this should be the relative url path you are trying to protect, not the absolute file system path. Try this:

auth.require = ( "/ispgen" =>

You may need to stick this inside of an appropriate $HTTP["host"] in your lighttpd.conf.

Good luck!

link|improve this answer
Thank you! That works! – hazelnut Jun 25 '11 at 9:25
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.