Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

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!

share|improve this answer
    
Thank you! That works! –  hazelnut Jun 25 '11 at 9:25
    
I have the same problem, and also protected my old Plesk Panel like that. The problem is, since I've updated to "11.5.30 Update #11", it doesn't work anymore. It also changed my custom port! Though, the custimzeations are still in the right files. I just don't get it. –  Keenora Fluffball Aug 9 '13 at 11:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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