Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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/" =>
    "method"  => "basic",
    "realm"   => "ISPGen",
    "require" => "valid-user"

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

share|improve this question
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

Your Answer


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.