1

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?

hazelnut
  • 25
  • 1
  • 8

1 Answers1

2

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!

baraboom
  • 236
  • 2
  • 4
  • 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 09 '13 at 11:04